paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Address linked list routine. |
| 3 | * Copyright (C) 1997, 98 Kunihiro Ishiguro |
| 4 | * |
| 5 | * This file is part of GNU Zebra. |
| 6 | * |
| 7 | * GNU Zebra is free software; you can redistribute it and/or modify it |
| 8 | * under the terms of the GNU General Public License as published by the |
| 9 | * Free Software Foundation; either version 2, or (at your option) any |
| 10 | * later version. |
| 11 | * |
| 12 | * GNU Zebra is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with GNU Zebra; see the file COPYING. If not, write to the Free |
| 19 | * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 20 | * 02111-1307, USA. |
| 21 | */ |
| 22 | |
| 23 | #include <zebra.h> |
| 24 | |
| 25 | #include "prefix.h" |
| 26 | #include "linklist.h" |
| 27 | #include "if.h" |
| 28 | #include "table.h" |
| 29 | #include "rib.h" |
| 30 | #include "table.h" |
| 31 | #include "log.h" |
paul | 0752ef0 | 2005-11-03 12:35:21 +0000 | [diff] [blame] | 32 | #include "memory.h" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 33 | |
| 34 | #include "zebra/zserv.h" |
| 35 | #include "zebra/redistribute.h" |
hasso | eef1fe1 | 2004-10-03 18:46:08 +0000 | [diff] [blame] | 36 | #include "zebra/interface.h" |
paul | a1ac18c | 2005-06-28 17:17:12 +0000 | [diff] [blame] | 37 | #include "zebra/connected.h" |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 38 | |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 39 | /* withdraw a connected address */ |
| 40 | static void |
| 41 | connected_withdraw (struct connected *ifc) |
| 42 | { |
| 43 | if (! ifc) |
| 44 | return; |
| 45 | |
| 46 | /* Update interface address information to protocol daemon. */ |
| 47 | if (CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL)) |
| 48 | { |
| 49 | zebra_interface_address_delete_update (ifc->ifp, ifc); |
| 50 | |
| 51 | if_subnet_delete (ifc->ifp, ifc); |
| 52 | |
| 53 | if (ifc->address->family == AF_INET) |
| 54 | connected_down_ipv4 (ifc->ifp, ifc); |
vincent | aa2e32b | 2005-09-28 13:42:11 +0000 | [diff] [blame] | 55 | #ifdef HAVE_IPV6 |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 56 | else |
| 57 | connected_down_ipv6 (ifc->ifp, ifc); |
vincent | aa2e32b | 2005-09-28 13:42:11 +0000 | [diff] [blame] | 58 | #endif |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 59 | |
| 60 | UNSET_FLAG (ifc->conf, ZEBRA_IFC_REAL); |
| 61 | } |
| 62 | |
| 63 | listnode_delete (ifc->ifp->connected, ifc); |
| 64 | connected_free (ifc); |
| 65 | } |
| 66 | |
| 67 | static void |
| 68 | connected_announce (struct interface *ifp, struct connected *ifc) |
| 69 | { |
| 70 | if (!ifc) |
| 71 | return; |
| 72 | |
| 73 | listnode_add (ifp->connected, ifc); |
| 74 | |
| 75 | /* Update interface address information to protocol daemon. */ |
| 76 | if (! CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL)) |
| 77 | { |
| 78 | if (ifc->address->family == AF_INET) |
| 79 | if_subnet_add (ifp, ifc); |
| 80 | |
| 81 | SET_FLAG (ifc->conf, ZEBRA_IFC_REAL); |
| 82 | |
| 83 | zebra_interface_address_add_update (ifp, ifc); |
| 84 | |
| 85 | if (if_is_up(ifp)) |
| 86 | { |
| 87 | if (ifc->address->family == AF_INET) |
| 88 | connected_up_ipv4 (ifp, ifc); |
vincent | aa2e32b | 2005-09-28 13:42:11 +0000 | [diff] [blame] | 89 | #ifdef HAVE_IPV6 |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 90 | else |
| 91 | connected_up_ipv6 (ifp, ifc); |
vincent | aa2e32b | 2005-09-28 13:42:11 +0000 | [diff] [blame] | 92 | #endif |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 93 | } |
| 94 | } |
| 95 | } |
| 96 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 97 | /* If same interface address is already exist... */ |
| 98 | struct connected * |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 99 | connected_check (struct interface *ifp, struct prefix *p) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 100 | { |
| 101 | struct connected *ifc; |
hasso | 52dc7ee | 2004-09-23 19:18:23 +0000 | [diff] [blame] | 102 | struct listnode *node; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 103 | |
paul | 1eb8ef2 | 2005-04-07 07:30:20 +0000 | [diff] [blame] | 104 | for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, ifc)) |
| 105 | if (prefix_same (ifc->address, p)) |
| 106 | return ifc; |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 107 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 108 | return NULL; |
| 109 | } |
| 110 | |
| 111 | /* Called from if_up(). */ |
| 112 | void |
| 113 | connected_up_ipv4 (struct interface *ifp, struct connected *ifc) |
| 114 | { |
| 115 | struct prefix_ipv4 p; |
| 116 | struct prefix_ipv4 *addr; |
| 117 | struct prefix_ipv4 *dest; |
| 118 | |
| 119 | if (! CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL)) |
| 120 | return; |
| 121 | |
| 122 | addr = (struct prefix_ipv4 *) ifc->address; |
| 123 | dest = (struct prefix_ipv4 *) ifc->destination; |
| 124 | |
| 125 | memset (&p, 0, sizeof (struct prefix_ipv4)); |
| 126 | p.family = AF_INET; |
| 127 | p.prefixlen = addr->prefixlen; |
| 128 | |
| 129 | /* Point-to-point check. */ |
hasso | 3fb9cd6 | 2004-10-19 19:44:43 +0000 | [diff] [blame] | 130 | if (CONNECTED_POINTOPOINT_HOST(ifc)) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 131 | p.prefix = dest->prefix; |
| 132 | else |
| 133 | p.prefix = addr->prefix; |
| 134 | |
| 135 | /* Apply mask to the network. */ |
| 136 | apply_mask_ipv4 (&p); |
| 137 | |
| 138 | /* In case of connected address is 0.0.0.0/0 we treat it tunnel |
| 139 | address. */ |
| 140 | if (prefix_ipv4_any (&p)) |
| 141 | return; |
| 142 | |
paul | c713300 | 2006-01-17 17:56:18 +0000 | [diff] [blame] | 143 | rib_add_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0, |
| 144 | ifp->metric, 0); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 145 | |
| 146 | rib_update (); |
| 147 | } |
| 148 | |
| 149 | /* Add connected IPv4 route to the interface. */ |
| 150 | void |
| 151 | connected_add_ipv4 (struct interface *ifp, int flags, struct in_addr *addr, |
paul | d06b2a6 | 2005-10-11 03:53:54 +0000 | [diff] [blame] | 152 | u_char prefixlen, struct in_addr *broad, |
| 153 | const char *label) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 154 | { |
| 155 | struct prefix_ipv4 *p; |
| 156 | struct connected *ifc; |
| 157 | struct connected *current; |
| 158 | |
| 159 | /* Make connected structure. */ |
| 160 | ifc = connected_new (); |
| 161 | ifc->ifp = ifp; |
| 162 | ifc->flags = flags; |
| 163 | |
| 164 | /* Allocate new connected address. */ |
| 165 | p = prefix_ipv4_new (); |
| 166 | p->family = AF_INET; |
| 167 | p->prefix = *addr; |
| 168 | p->prefixlen = prefixlen; |
| 169 | ifc->address = (struct prefix *) p; |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 170 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 171 | /* If there is broadcast or pointopoint address. */ |
| 172 | if (broad) |
| 173 | { |
| 174 | p = prefix_ipv4_new (); |
| 175 | p->family = AF_INET; |
| 176 | p->prefix = *broad; |
| 177 | ifc->destination = (struct prefix *) p; |
hasso | 3fb9cd6 | 2004-10-19 19:44:43 +0000 | [diff] [blame] | 178 | |
| 179 | /* validate the destination address */ |
| 180 | if (ifp->flags & IFF_POINTOPOINT) |
| 181 | { |
| 182 | if (IPV4_ADDR_SAME(addr,broad)) |
| 183 | zlog_warn("warning: PtP interface %s has same local and peer " |
| 184 | "address %s, routing protocols may malfunction", |
| 185 | ifp->name,inet_ntoa(*addr)); |
| 186 | else if ((prefixlen != IPV4_MAX_PREFIXLEN) && |
| 187 | (ipv4_network_addr(addr->s_addr,prefixlen) != |
| 188 | ipv4_network_addr(broad->s_addr,prefixlen))) |
| 189 | { |
| 190 | char buf[2][INET_ADDRSTRLEN]; |
| 191 | zlog_warn("warning: PtP interface %s network mismatch: local " |
| 192 | "%s/%d vs. peer %s, routing protocols may malfunction", |
| 193 | ifp->name, |
| 194 | inet_ntop (AF_INET, addr, buf[0], sizeof(buf[0])), |
| 195 | prefixlen, |
| 196 | inet_ntop (AF_INET, broad, buf[1], sizeof(buf[1]))); |
| 197 | } |
| 198 | } |
| 199 | else |
| 200 | { |
| 201 | if (broad->s_addr != ipv4_broadcast_addr(addr->s_addr,prefixlen)) |
| 202 | { |
| 203 | char buf[2][INET_ADDRSTRLEN]; |
| 204 | struct in_addr bcalc; |
| 205 | bcalc.s_addr = ipv4_broadcast_addr(addr->s_addr,prefixlen); |
| 206 | zlog_warn("warning: interface %s broadcast addr %s/%d != " |
| 207 | "calculated %s, routing protocols may malfunction", |
| 208 | ifp->name, |
| 209 | inet_ntop (AF_INET, broad, buf[0], sizeof(buf[0])), |
| 210 | prefixlen, |
| 211 | inet_ntop (AF_INET, &bcalc, buf[1], sizeof(buf[1]))); |
| 212 | } |
| 213 | } |
| 214 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 215 | } |
hasso | 3fb9cd6 | 2004-10-19 19:44:43 +0000 | [diff] [blame] | 216 | else |
| 217 | /* no broadcast or destination address was supplied */ |
ajs | 341a8f1 | 2004-12-22 16:32:16 +0000 | [diff] [blame] | 218 | if ((prefixlen == IPV4_MAX_PREFIXLEN) && if_is_pointopoint(ifp)) |
| 219 | zlog_warn("warning: PtP interface %s with addr %s/%d needs a " |
| 220 | "peer address",ifp->name,inet_ntoa(*addr),prefixlen); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 221 | |
| 222 | /* Label of this address. */ |
| 223 | if (label) |
paul | 0752ef0 | 2005-11-03 12:35:21 +0000 | [diff] [blame] | 224 | ifc->label = XSTRDUP (MTYPE_CONNECTED_LABEL, label); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 225 | |
| 226 | /* Check same connected route. */ |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 227 | if ((current = connected_check (ifp, (struct prefix *) ifc->address))) |
| 228 | connected_withdraw (current); /* implicit withdraw - freebsd does this */ |
| 229 | |
| 230 | connected_announce (ifp, ifc); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | void |
| 234 | connected_down_ipv4 (struct interface *ifp, struct connected *ifc) |
| 235 | { |
| 236 | struct prefix_ipv4 p; |
| 237 | struct prefix_ipv4 *addr; |
| 238 | struct prefix_ipv4 *dest; |
| 239 | |
| 240 | if (! CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL)) |
| 241 | return; |
| 242 | |
| 243 | addr = (struct prefix_ipv4 *)ifc->address; |
| 244 | dest = (struct prefix_ipv4 *)ifc->destination; |
| 245 | |
| 246 | memset (&p, 0, sizeof (struct prefix_ipv4)); |
| 247 | p.family = AF_INET; |
| 248 | p.prefixlen = addr->prefixlen; |
| 249 | |
paul | 960182a | 2003-04-09 07:16:04 +0000 | [diff] [blame] | 250 | /* Point-to-point check. */ |
hasso | 3fb9cd6 | 2004-10-19 19:44:43 +0000 | [diff] [blame] | 251 | if (CONNECTED_POINTOPOINT_HOST(ifc)) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 252 | p.prefix = dest->prefix; |
| 253 | else |
| 254 | p.prefix = addr->prefix; |
| 255 | |
| 256 | /* Apply mask to the network. */ |
| 257 | apply_mask_ipv4 (&p); |
| 258 | |
| 259 | /* In case of connected address is 0.0.0.0/0 we treat it tunnel |
| 260 | address. */ |
| 261 | if (prefix_ipv4_any (&p)) |
| 262 | return; |
| 263 | |
| 264 | rib_delete_ipv4 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0); |
| 265 | |
| 266 | rib_update (); |
| 267 | } |
| 268 | |
| 269 | /* Delete connected IPv4 route to the interface. */ |
| 270 | void |
| 271 | connected_delete_ipv4 (struct interface *ifp, int flags, struct in_addr *addr, |
paul | 0752ef0 | 2005-11-03 12:35:21 +0000 | [diff] [blame] | 272 | u_char prefixlen, struct in_addr *broad) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 273 | { |
| 274 | struct prefix_ipv4 p; |
| 275 | struct connected *ifc; |
| 276 | |
| 277 | memset (&p, 0, sizeof (struct prefix_ipv4)); |
| 278 | p.family = AF_INET; |
| 279 | p.prefix = *addr; |
| 280 | p.prefixlen = prefixlen; |
| 281 | |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 282 | ifc = connected_check (ifp, (struct prefix *) &p); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 283 | if (! ifc) |
| 284 | return; |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 285 | |
| 286 | connected_withdraw (ifc); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 287 | } |
| 288 | |
| 289 | #ifdef HAVE_IPV6 |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 290 | void |
| 291 | connected_up_ipv6 (struct interface *ifp, struct connected *ifc) |
| 292 | { |
| 293 | struct prefix_ipv6 p; |
| 294 | struct prefix_ipv6 *addr; |
| 295 | struct prefix_ipv6 *dest; |
| 296 | |
| 297 | if (! CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL)) |
| 298 | return; |
| 299 | |
| 300 | addr = (struct prefix_ipv6 *) ifc->address; |
| 301 | dest = (struct prefix_ipv6 *) ifc->destination; |
| 302 | |
| 303 | memset (&p, 0, sizeof (struct prefix_ipv6)); |
| 304 | p.family = AF_INET6; |
| 305 | p.prefixlen = addr->prefixlen; |
| 306 | |
paul | 31a476c | 2003-09-29 19:54:53 +0000 | [diff] [blame] | 307 | if (if_is_pointopoint (ifp) && dest) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 308 | { |
| 309 | if (IN6_IS_ADDR_UNSPECIFIED (&dest->prefix)) |
| 310 | p.prefix = addr->prefix; |
| 311 | else |
| 312 | p.prefix = dest->prefix; |
| 313 | } |
| 314 | else |
| 315 | p.prefix = addr->prefix; |
| 316 | |
| 317 | /* Apply mask to the network. */ |
| 318 | apply_mask_ipv6 (&p); |
| 319 | |
hasso | 726f9b2 | 2003-05-25 21:04:54 +0000 | [diff] [blame] | 320 | #if ! defined (MUSICA) && ! defined (LINUX) |
| 321 | /* XXX: It is already done by rib_bogus_ipv6 within rib_add_ipv6 */ |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 322 | if (IN6_IS_ADDR_UNSPECIFIED (&p.prefix)) |
| 323 | return; |
hasso | 726f9b2 | 2003-05-25 21:04:54 +0000 | [diff] [blame] | 324 | #endif |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 325 | |
paul | c713300 | 2006-01-17 17:56:18 +0000 | [diff] [blame] | 326 | rib_add_ipv6 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0, |
| 327 | ifp->metric, 0); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 328 | |
| 329 | rib_update (); |
| 330 | } |
| 331 | |
| 332 | /* Add connected IPv6 route to the interface. */ |
| 333 | void |
| 334 | connected_add_ipv6 (struct interface *ifp, struct in6_addr *addr, |
paul | 89368d9 | 2005-11-26 09:14:07 +0000 | [diff] [blame] | 335 | u_char prefixlen, struct in6_addr *broad, |
| 336 | const char *label) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 337 | { |
| 338 | struct prefix_ipv6 *p; |
| 339 | struct connected *ifc; |
| 340 | struct connected *current; |
| 341 | |
| 342 | /* Make connected structure. */ |
| 343 | ifc = connected_new (); |
| 344 | ifc->ifp = ifp; |
| 345 | |
| 346 | /* Allocate new connected address. */ |
| 347 | p = prefix_ipv6_new (); |
| 348 | p->family = AF_INET6; |
| 349 | IPV6_ADDR_COPY (&p->prefix, addr); |
| 350 | p->prefixlen = prefixlen; |
| 351 | ifc->address = (struct prefix *) p; |
| 352 | |
| 353 | /* If there is broadcast or pointopoint address. */ |
| 354 | if (broad) |
| 355 | { |
| 356 | p = prefix_ipv6_new (); |
| 357 | p->family = AF_INET6; |
| 358 | IPV6_ADDR_COPY (&p->prefix, broad); |
| 359 | ifc->destination = (struct prefix *) p; |
| 360 | } |
| 361 | |
paul | 0752ef0 | 2005-11-03 12:35:21 +0000 | [diff] [blame] | 362 | /* Label of this address. */ |
| 363 | if (label) |
| 364 | ifc->label = XSTRDUP (MTYPE_CONNECTED_LABEL, label); |
| 365 | |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 366 | if ((current = connected_check (ifp, (struct prefix *) ifc->address))) |
| 367 | connected_withdraw (current); /* implicit update of existing address */ |
| 368 | |
| 369 | connected_announce (ifp, ifc); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 370 | } |
| 371 | |
| 372 | void |
| 373 | connected_down_ipv6 (struct interface *ifp, struct connected *ifc) |
| 374 | { |
| 375 | struct prefix_ipv6 p; |
| 376 | struct prefix_ipv6 *addr; |
| 377 | struct prefix_ipv6 *dest; |
| 378 | |
| 379 | if (! CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL)) |
| 380 | return; |
| 381 | |
| 382 | addr = (struct prefix_ipv6 *) ifc->address; |
| 383 | dest = (struct prefix_ipv6 *) ifc->destination; |
| 384 | |
| 385 | memset (&p, 0, sizeof (struct prefix_ipv6)); |
| 386 | p.family = AF_INET6; |
| 387 | p.prefixlen = addr->prefixlen; |
| 388 | |
paul | 31a476c | 2003-09-29 19:54:53 +0000 | [diff] [blame] | 389 | if (if_is_pointopoint (ifp) && dest) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 390 | { |
| 391 | if (IN6_IS_ADDR_UNSPECIFIED (&dest->prefix)) |
| 392 | p.prefix = addr->prefix; |
| 393 | else |
| 394 | p.prefix = dest->prefix; |
| 395 | } |
| 396 | else |
| 397 | p.prefix = addr->prefix; |
| 398 | |
| 399 | apply_mask_ipv6 (&p); |
| 400 | |
| 401 | if (IN6_IS_ADDR_UNSPECIFIED (&p.prefix)) |
| 402 | return; |
| 403 | |
| 404 | rib_delete_ipv6 (ZEBRA_ROUTE_CONNECT, 0, &p, NULL, ifp->ifindex, 0); |
| 405 | |
| 406 | rib_update (); |
| 407 | } |
| 408 | |
| 409 | void |
| 410 | connected_delete_ipv6 (struct interface *ifp, struct in6_addr *address, |
hasso | fce954f | 2004-10-07 20:29:24 +0000 | [diff] [blame] | 411 | u_char prefixlen, struct in6_addr *broad) |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 412 | { |
| 413 | struct prefix_ipv6 p; |
| 414 | struct connected *ifc; |
| 415 | |
| 416 | memset (&p, 0, sizeof (struct prefix_ipv6)); |
| 417 | p.family = AF_INET6; |
| 418 | memcpy (&p.prefix, address, sizeof (struct in6_addr)); |
| 419 | p.prefixlen = prefixlen; |
| 420 | |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 421 | ifc = connected_check (ifp, (struct prefix *) &p); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 422 | if (! ifc) |
| 423 | return; |
| 424 | |
paul | ca16218 | 2005-09-12 16:58:52 +0000 | [diff] [blame] | 425 | connected_withdraw (ifc); |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 426 | } |
| 427 | #endif /* HAVE_IPV6 */ |