From 2d30eb72e031b70f3dc02e94a1bffaec56d9a0b0 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 1 Jul 1998 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1998-07-01 --- ip/ipmux.c | 8 +++++++- ip/iproute.c | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ip/ipmux.c b/ip/ipmux.c index d858ba73d9bc4ebd03167a812607cfb6e27f6cf2..2ef0a1cbf40f6c2b320e8c6b7c3eadfa3f246d03 100644 --- a/ip/ipmux.c +++ b/ip/ipmux.c @@ -724,7 +724,13 @@ yes: runlock(f); if(c != nil){ - qpass(c->rq, bp); + /* tack on interface address */ + bp = padblock(bp, IPaddrlen); + ipmove(bp->rp, ia); + bp = concatblock(bp); + if(bp != nil) + if (qpass(c->rq, bp) < 0) + print("Q"); return; } diff --git a/ip/iproute.c b/ip/iproute.c index 48b47c87cf2d74643c1ec8d0e2372f281756e7bb..18e92b7e9225042b6edd701f880dc0983c4f4339 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -743,9 +743,10 @@ routeflush(Fs *f, Route *r, char *tag) if(routeflush(f, r->right, tag)) return 1; if((r->type & Rifc) == 0){ - if(tag == nil || strncmp(tag, r->tag, sizeof(r->tag)) == 0) + if(tag == nil || strncmp(tag, r->tag, sizeof(r->tag)) == 0){ delroute(f, r, 0); - return 1; + return 1; + } } return 0; }