summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-12-08 22:13:32 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-12-08 22:13:32 +0000
commitaa8af9c5a32b5f3afe0e612981fe4d9fada43d34 (patch)
treeffa66e879ccf4758b3837a277366f2da288e1d5d
parent744053268d196e8c282d20243600fb33d4df0028 (diff)
devip: ignore addmulti() errors in addselfcache()
If the interface does not support multicast, ignore it.
-rw-r--r--sys/src/9/ip/ipifc.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/src/9/ip/ipifc.c b/sys/src/9/ip/ipifc.c
index ea108a19b..6256514f6 100644
--- a/sys/src/9/ip/ipifc.c
+++ b/sys/src/9/ip/ipifc.c
@@ -953,10 +953,18 @@ addselfcache(Fs *f, Ipifc *ifc, Iplifc *lifc, uchar *a, int type)
a, type, ifc, tifc);
if(type & Rmulti){
- if(ifc->m->addmulti != nil)
- (*ifc->m->addmulti)(ifc, a, lifc->local);
- if(multicastreportfn != nil)
- (*multicastreportfn)(f, ifc, a, lifc->local, 0);
+ if(ifc->m->addmulti != nil){
+ if(!waserror()){
+ (*ifc->m->addmulti)(ifc, a, lifc->local);
+ poperror();
+ }
+ }
+ if(multicastreportfn != nil){
+ if(!waserror()){
+ (*multicastreportfn)(f, ifc, a, lifc->local, 0);
+ poperror();
+ }
+ }
}
} else
lp->ref++;