mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
devip: do not raise error from ipoput*()
It seems some protocols are unprepared to deal with ipoput*() raising an error (thrown from ifc->m->bwrite()). so catch it and return -1 (no route) instead.
This commit is contained in:
parent
520d698c3e
commit
75ac2674de
2 changed files with 10 additions and 4 deletions
|
@ -129,10 +129,13 @@ ipoput4(Fs *f, Block *bp, Ipifc *gating, int ttl, int tos, Routehint *rh)
|
|||
}
|
||||
if(waserror()){
|
||||
runlock(ifc);
|
||||
nexterror();
|
||||
/* bp is freed by m->bwrite() called from ipifcoput() */
|
||||
return -1;
|
||||
}
|
||||
if(ifc->m == nil || ifc->ifcid != r->ifcid)
|
||||
if(ifc->m == nil || ifc->ifcid != r->ifcid){
|
||||
rv = -1;
|
||||
goto raise;
|
||||
}
|
||||
|
||||
medialen = ifc->maxtu - ifc->m->hsize;
|
||||
if(gating != nil) {
|
||||
|
|
|
@ -82,11 +82,14 @@ ipoput6(Fs *f, Block *bp, Ipifc *gating, int ttl, int tos, Routehint *rh)
|
|||
}
|
||||
if(waserror()){
|
||||
runlock(ifc);
|
||||
nexterror();
|
||||
/* bp is freed by m->bwrite() called from ipifcoput() */
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(ifc->m == nil || r->ifcid != ifc->ifcid)
|
||||
if(ifc->m == nil || r->ifcid != ifc->ifcid){
|
||||
rv = -1;
|
||||
goto raise;
|
||||
}
|
||||
|
||||
medialen = ifc->maxtu - ifc->m->hsize;
|
||||
if(gating != nil){
|
||||
|
|
Loading…
Reference in a new issue