X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_openvuplus_3.0;a=blobdiff_plain;f=meta-openvuplus%2Frecipes-core%2Fbusybox%2Fbusybox-1.19.4%2F0004-ifupdown-support-metric-for-static-default-gw.patch;fp=meta-openvuplus%2Frecipes-core%2Fbusybox%2Fbusybox-1.19.4%2F0004-ifupdown-support-metric-for-static-default-gw.patch;h=0000000000000000000000000000000000000000;hp=d9c14aa71ef048716b7ef076a640e23e73add967;hb=a21a49a4366b35022bb543e8dc79eb520ecad6bf;hpb=961cbc3bac5f720d7af8f347e679587416013fd3;ds=sidebyside diff --git a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0004-ifupdown-support-metric-for-static-default-gw.patch b/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0004-ifupdown-support-metric-for-static-default-gw.patch deleted file mode 100644 index d9c14aa..0000000 --- a/meta-openvuplus/recipes-core/busybox/busybox-1.19.4/0004-ifupdown-support-metric-for-static-default-gw.patch +++ /dev/null @@ -1,64 +0,0 @@ -From fecb0cbff5ca703f8fc00a8e0e93f1f2e3ae942b Mon Sep 17 00:00:00 2001 -From: Natanael Copa -Date: Fri, 17 Feb 2012 19:36:26 +0000 -Subject: [PATCH 04/10] ifupdown: support metric for static default gw - -This is useful when you have multiple ISPs with failover. It allows -setting the priority of the static gateway and makes it possible -to specify multiple static gateways. - -The ubuntu ifupdown supports it. - -function old new delta -.rodata 116725 116797 +72 ------------------------------------------------------------------------------- -(add/remove: 0/0 grow/shrink: 1/0 up/down: 72/0) Total: 72 bytes - text data bss dec hex filename - 953343 7313 8984 969640 ecba8 busybox_old - 953415 7313 8984 969712 ecbf0 busybox_unstripped - -Signed-off-by: Natanael Copa -Signed-off-by: Denys Vlasenko ---- - networking/ifupdown.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/networking/ifupdown.c b/networking/ifupdown.c -index 9c2cad2..9f49619 100644 ---- a/networking/ifupdown.c -+++ b/networking/ifupdown.c -@@ -403,11 +403,11 @@ static int FAST_FUNC static_up6(struct interface_defn_t *ifd, execfn *exec) - result = execute("ip addr add %address%/%netmask% dev %iface%[[ label %label%]]", ifd, exec); - result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec); - /* Was: "[[ ip ....%gateway% ]]". Removed extra spaces w/o checking */ -- result += execute("[[ip route add ::/0 via %gateway%]]", ifd, exec); -+ result += execute("[[ip route add ::/0 via %gateway%]][[ prio %metric%]]", ifd, exec); - # else - result = execute("ifconfig %iface%[[ media %media%]][[ hw %hwaddress%]][[ mtu %mtu%]] up", ifd, exec); - result += execute("ifconfig %iface% add %address%/%netmask%", ifd, exec); -- result += execute("[[route -A inet6 add ::/0 gw %gateway%]]", ifd, exec); -+ result += execute("[[route -A inet6 add ::/0 gw %gateway%[[ metric %metric%]]]]", ifd, exec); - # endif - return ((result == 3) ? 3 : 0); - } -@@ -490,7 +490,7 @@ static int FAST_FUNC static_up(struct interface_defn_t *ifd, execfn *exec) - result = execute("ip addr add %address%/%bnmask%[[ broadcast %broadcast%]] " - "dev %iface%[[ peer %pointopoint%]][[ label %label%]]", ifd, exec); - result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec); -- result += execute("[[ip route add default via %gateway% dev %iface%]]", ifd, exec); -+ result += execute("[[ip route add default via %gateway% dev %iface%[[ prio %metric%]]]]", ifd, exec); - return ((result == 3) ? 3 : 0); - # else - /* ifconfig said to set iface up before it processes hw %hwaddress%, -@@ -500,7 +500,7 @@ static int FAST_FUNC static_up(struct interface_defn_t *ifd, execfn *exec) - result += execute("ifconfig %iface% %address% netmask %netmask%" - "[[ broadcast %broadcast%]][[ pointopoint %pointopoint%]] ", - ifd, exec); -- result += execute("[[route add default gw %gateway% %iface%]]", ifd, exec); -+ result += execute("[[route add default gw %gateway%[[ metric %metric%]] %iface%]]", ifd, exec); - return ((result == 3) ? 3 : 0); - # endif - } --- -1.7.10.4 -