~kris/9p

9hist

95b30dbdaaa8ad2c71e5c9c0af9575e7207a6223 — David du Colombier 29 years ago 87149f0
Plan 9 from Bell Labs 1997-07-08
1 files changed, 7 insertions(+), 2 deletions(-)

M ip/udp.c
M ip/udp.c => ip/udp.c +7 -2
@@ 270,7 270,10 @@ udpiput(Media *m, Block *bp)
		/* pass the src address */
		bp = padblock(bp, UDP_USEAD);
		hnputl(bp->rp, raddr);
		hnputl(bp->rp+4, laddr);
		if(Mediaforme(uh->udpdst) > 0)
			hnputl(bp->rp+4, laddr);
		else
			hnputl(bp->rp+4, m->myip[0]);
		hnputs(bp->rp+8, rport);
		hnputs(bp->rp+10, lport);
	} else {


@@ 282,7 285,9 @@ udpiput(Media *m, Block *bp)

			/* reply with the same ip address (if not broadcast) */
			if(Mediaforme(uh->udpdst) > 0)
				c->laddr = nhgetl(uh->udpdst);
				c->laddr = laddr;
			else
				c->laddr = m->myip[0];
		}
	}
	if(bp->next)