unbreak IPv6 and its tests

This commit is contained in:
Sergio R. Caprile committed 2026-06-03 10:38:49 -03:00
1 parent a59d89e393
commit 80b381a1c6
3 files changed
+5 -3

No files matched your search

+2 -1
View File
@@ -8307,7 +8307,7 @@ static void rx_ndp_ra(struct mg_tcpip_if *ifp, struct pkt *pkt) {
(void) pref_lifetime;
gotprefix = true;
if (prefix_len != ifp->prefix || !match_prefix(prefix, ifp->prefix, ifp->prefix_len))
if (prefix_len != ifp->prefix_len || !match_prefix(prefix, ifp->prefix, ifp->prefix_len))
changed = true;
}
opts += length;
@@ -8395,6 +8395,7 @@ static void onstate6change(struct mg_tcpip_if *ifp) {
(struct mg_addr *) &ip6_allrouters),
ifp->ip6, (uint64_t *) ip6_allrouters.addr.ip6, false,
ifp->mac);
}
if (ifp->is_ip6_changed) {
struct mg_connection *c;
for (c = ifp->mgr->conns; c != NULL; c = c->next) {
+2 -1
View File
@@ -998,7 +998,7 @@ static void rx_ndp_ra(struct mg_tcpip_if *ifp, struct pkt *pkt) {
(void) pref_lifetime;
gotprefix = true;
if (prefix_len != ifp->prefix || !match_prefix(prefix, ifp->prefix, ifp->prefix_len))
if (prefix_len != ifp->prefix_len || !match_prefix(prefix, ifp->prefix, ifp->prefix_len))
changed = true;
}
opts += length;
@@ -1086,6 +1086,7 @@ static void onstate6change(struct mg_tcpip_if *ifp) {
(struct mg_addr *) &ip6_allrouters),
ifp->ip6, (uint64_t *) ip6_allrouters.addr.ip6, false,
ifp->mac);
}
if (ifp->is_ip6_changed) {
struct mg_connection *c;
for (c = ifp->mgr->conns; c != NULL; c = c->next) {
+1 -1
View File
@@ -83,7 +83,7 @@ static void test_statechange(void) {
}
#if MG_ENABLE_IPV6
static void mif6_fn(struct mg_tcpip_if *ifp, int ev, void *ev_data) {
if (ev == MG_TCPIP_EV_STATE_CHANGE) {
if (ev == MG_TCPIP_EV_STATE6_CHANGE) {
ASSERT(*(uint8_t *) ev_data == MG_TCPIP_STATE_REQ);
executed = true;
}