comparison src/ipv6nd.c @ 5557:e65d193a1960 draft

Linux: Support wireless IP roaming This is achieved by checking that the interface is wireless, IFF_UP and IFF_LOWER_UP are present, but IFF_RUNNING is missing. This gives exactly the same support as modern NetBSD when carrier loss is detected, but without the address verifications when the carrier comes back as that needs to be handled in the kernel. While IP setup is maintained, other configuration data is discarded. Note that this should be improved in the future. Thanks to Boris Krasnovskiy <borkra@gmail.com> for helping with this.
author Roy Marples <roy@marples.name>
date Sat, 12 Dec 2020 13:12:26 +0000
parents a0d828e25482
children
comparison
equal deleted inserted replaced
5556:99bfd2eb77ab 5557:e65d193a1960
1153 logdebugx("%s: ignoring RA from ourself %s", 1153 logdebugx("%s: ignoring RA from ourself %s",
1154 ifp->name, sfrom); 1154 ifp->name, sfrom);
1155 return; 1155 return;
1156 } 1156 }
1157 1157
1158 #ifdef NOCARRIER_PRESERVE_IP
1159 /* 1158 /*
1160 * Because we preserve RA's and expire them quickly after 1159 * Because we preserve RA's and expire them quickly after
1161 * carrier up, it's important to reset the kernels notion of 1160 * carrier up, it's important to reset the kernels notion of
1162 * reachable timers back to default values before applying 1161 * reachable timers back to default values before applying
1163 * new RA values. 1162 * new RA values.
1166 if (ifp == rap->iface) 1165 if (ifp == rap->iface)
1167 break; 1166 break;
1168 } 1167 }
1169 if (rap != NULL && rap->willexpire) 1168 if (rap != NULL && rap->willexpire)
1170 ipv6nd_applyra(ifp); 1169 ipv6nd_applyra(ifp);
1171 #endif
1172 1170
1173 TAILQ_FOREACH(rap, ctx->ra_routers, next) { 1171 TAILQ_FOREACH(rap, ctx->ra_routers, next) {
1174 if (ifp == rap->iface && 1172 if (ifp == rap->iface &&
1175 IN6_ARE_ADDR_EQUAL(&rap->from, &from->sin6_addr)) 1173 IN6_ARE_ADDR_EQUAL(&rap->from, &from->sin6_addr))
1176 break; 1174 break;