On Fri, Sep 20, 2019 at 11:08:39AM +0200, Antony Antony wrote:
> There is an annoying issue when running inside docker/namespace.  The proxy 
> arp function in _updown.netkey would fails. It has been bugging me for 
> years!
> Now I tracked it down to two lines in _updown.netkey.in
> 
> Here my first attempt to replace it using "ip link " command.  
> 
> programs/_updown.netkey/_updown.netkey.in
> -           if [ -r /sys/class/net/${iface}/address ]; then
> -               macaddr=$(cat /sys/class/net/${iface}/address)
> +           if ip -o link show dev ${iface}; then
> +               macaddr=$(ip -o link show dev ${iface} | awk '$2 != 
> "${iface}:" {print $(NF-4)}')

Looking at docker containers here, eth0 is in /sys/class/net/ in
the container and appears to have the correct mac address showing.
Matches what ip command shows.  Not sure why yours would not have it.

-- 
Len Sorensen
_______________________________________________
Swan-dev mailing list
[email protected]
https://lists.libreswan.org/mailman/listinfo/swan-dev

Reply via email to