diff --git a/sys/src/9/ip/ipifc.c b/sys/src/9/ip/ipifc.c index b2fc1676c..4261eac90 100644 --- a/sys/src/9/ip/ipifc.c +++ b/sys/src/9/ip/ipifc.c @@ -1466,6 +1466,9 @@ ipifcaddmulti(Conv *c, uchar *ma, uchar *ia) Ipifc *ifc; Fs *f; + if(isv4(ma) != isv4(ia)) + error("incompatible multicast/interface ip address"); + for(l = &c->multi; *l != nil; l = &(*l)->next) if(ipcmp(ma, (*l)->ma) == 0 && ipcmp(ia, (*l)->ia) == 0) return; /* it's already there */