Skip to content
Snippets Groups Projects
Commit 0ccab234 authored by Sukru Senli's avatar Sukru Senli
Browse files

econet: add workaround to get dhcpv6 working on ae_wan

parent c5072264
No related branches found
No related tags found
No related merge requests found
[ "$ACTION" = ifup ] || exit 0
. /lib/functions/network.sh
network_get_device l3device $INTERFACE
[ "$l3device" == "ae_wan" ] || exit 0
ifconfig ae_wan | grep -q fe80 && exit 0
mac_to_ipv6_ll() {
IFS=':'; set $1; unset IFS
echo "fe80::$(printf %x $((0x$1 ^ 2)))$2:${3}ff:fe$4:$5$6" |
sed -E 's/:0+/:/g; s/:{3,}/::/; s/:$/:0/'
}
ae_wan_macaddr=$(ifconfig ae_wan | grep HWaddr | awk '{print$NF}')
ae_wan_ll_ipv6=$(mac_to_ipv6_ll $ae_wan_macaddr)
ip -6 addr flush dev ae_wan
ip -6 addr add $ae_wan_ll_ipv6 dev ae_wan
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment