diff options
author | Roy Li <rongqing.li@windriver.com> | 2013-11-04 11:31:50 +0800 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2013-11-06 15:10:58 -0500 |
commit | e854d0d71ea957d0fac78135bb67d1a0c70eeb2b (patch) | |
tree | cd9e436f4b5e988fab404f595a1243f062423827 /meta-networking/recipes-protocols/quagga/files | |
parent | fc88b591dfac2c13a7475a2c2d4637ff54cd0a75 (diff) | |
download | meta-openembedded-e854d0d71ea957d0fac78135bb67d1a0c70eeb2b.tar.gz |
quagga: backport a patch from 0.99.22 to fix "no ip address" command
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
Diffstat (limited to 'meta-networking/recipes-protocols/quagga/files')
-rw-r--r-- | meta-networking/recipes-protocols/quagga/files/lingering-IP-address-after-deletion-BZ-486.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/quagga/files/lingering-IP-address-after-deletion-BZ-486.patch b/meta-networking/recipes-protocols/quagga/files/lingering-IP-address-after-deletion-BZ-486.patch new file mode 100644 index 000000000..42bdc20fc --- /dev/null +++ b/meta-networking/recipes-protocols/quagga/files/lingering-IP-address-after-deletion-BZ-486.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From 7f062c217b262e362a3362c677dea6c5e820adf1 Mon Sep 17 00:00:00 2001 | ||
2 | From: David Lamparter <equinox@diac24.net> | ||
3 | Date: Mon, 1 Feb 2010 16:41:26 +0100 | ||
4 | Subject: [PATCH] zebra: lingering IP address after deletion (BZ#486) | ||
5 | |||
6 | Upstream-status: Backport | ||
7 | |||
8 | zebra address bookkeeping is a mess. this is just a workaround to have | ||
9 | IPv4 address deletion somewhat working on Linux. | ||
10 | |||
11 | the if_unset_prefix call is synchronous, when it returns success the | ||
12 | address deletion completed successfully. this is either signaled by a | ||
13 | netlink ACK or by an OK return value from ioctl(). | ||
14 | |||
15 | This version is wrapped by #ifdef HAVE_NETLINK so we don't touch the | ||
16 | BSDs for now. | ||
17 | |||
18 | * zebra/interface.c: On Linux, update zebra internal state after | ||
19 | deleting an address. | ||
20 | |||
21 | Signed-off-by: David Lamparter <equinox@opensourcerouting.org> | ||
22 | --- | ||
23 | zebra/interface.c | 21 ++++++++++++++++++--- | ||
24 | 1 file changed, 18 insertions(+), 3 deletions(-) | ||
25 | |||
26 | diff --git a/zebra/interface.c b/zebra/interface.c | ||
27 | index 2242259..3578b79 100644 | ||
28 | --- a/zebra/interface.c | ||
29 | +++ b/zebra/interface.c | ||
30 | @@ -1297,13 +1297,28 @@ ip_address_uninstall (struct vty *vty, struct interface *ifp, | ||
31 | safe_strerror(errno), VTY_NEWLINE); | ||
32 | return CMD_WARNING; | ||
33 | } | ||
34 | + /* success! call returned that the address deletion went through. | ||
35 | + * this is a synchronous operation, so we know it succeeded and can | ||
36 | + * now update all internal state. */ | ||
37 | + | ||
38 | + /* the HAVE_NETLINK check is only here because, on BSD, although the | ||
39 | + * call above is still synchronous, we get a second confirmation later | ||
40 | + * through the route socket, and we don't want to touch that behaviour | ||
41 | + * for now. It should work without the #ifdef, but why take the risk... | ||
42 | + * -- equinox 2012-07-13 */ | ||
43 | +#ifdef HAVE_NETLINK | ||
44 | + | ||
45 | + /* Remove connected route. */ | ||
46 | + connected_down_ipv4 (ifp, ifc); | ||
47 | |||
48 | -#if 0 | ||
49 | /* Redistribute this information. */ | ||
50 | zebra_interface_address_delete_update (ifp, ifc); | ||
51 | |||
52 | - /* Remove connected route. */ | ||
53 | - connected_down_ipv4 (ifp, ifc); | ||
54 | + /* IP address propery set. */ | ||
55 | + UNSET_FLAG (ifc->conf, ZEBRA_IFC_REAL); | ||
56 | + | ||
57 | + /* remove from interface, remark secondaries */ | ||
58 | + if_subnet_delete (ifp, ifc); | ||
59 | |||
60 | /* Free address information. */ | ||
61 | listnode_delete (ifp->connected, ifc); | ||
62 | -- | ||
63 | 1.7.10.4 | ||
64 | |||