67884a70141ec734efe871b625a02a8b7507d9e3
[openwrt/openwrt.git] / package / netifd / files / lib / netifd / ppp-up
1 #!/bin/sh
2 PPP_IPPARAM="$6"
3
4 . /lib/netifd/netifd-proto.sh
5 proto_init_update "$IFNAME" 1 1
6 [ -n "$PPP_IPPARAM" ] && {
7 [
8 [ -n "$IPLOCAL" ] && proto_add_ipv4_address "$IPREMOTE" 32
9 [ -n "$IPREMOTE" ] && proto_add_ipv4_route 0.0.0.0 0 "$IPREMOTE"
10 [ -n "$LLLOCAL" ] && proto_add_ipv6_address "$LLLOCAL" 128
11 [ -n "$LLREMOTE" ] && proto_add_ipv6_route "::0" 0 "$LLREMOTE"
12 [ -n "$DNS1" ] && proto_add_dns_server "$DNS1"
13 [ -n "$DNS2" -a "$DNS1" != "$DNS2" ] && proto_add_dns_server "$DNS2"
14 }
15 proto_send_update "$PPP_IPPARAM"
16