summaryrefslogtreecommitdiff
path: root/sys/src/9/ip/icmp.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-04-08 21:15:00 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2018-04-08 21:15:00 +0200
commitc2dd9b1da7659c9ac42e7612e5621e9426956c73 (patch)
tree8c191ea02792997669a87965419aac936243104f /sys/src/9/ip/icmp.c
parentdc8432d4593c7a4b0a187d0174d4e4e603e456f6 (diff)
devip: implement source specific routing
Diffstat (limited to 'sys/src/9/ip/icmp.c')
-rw-r--r--sys/src/9/ip/icmp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/src/9/ip/icmp.c b/sys/src/9/ip/icmp.c
index 21f226c7f..2a2d3e21b 100644
--- a/sys/src/9/ip/icmp.c
+++ b/sys/src/9/ip/icmp.c
@@ -200,7 +200,7 @@ ip4reply(Fs *f, uchar ip4[4])
if(ipismulticast(addr))
return 0;
i = ipforme(f, addr);
- return i == 0 || (i & Runi) != 0;
+ return i == 0 || i == Runi;
}
static int
@@ -211,7 +211,7 @@ ip4me(Fs *f, uchar ip4[4])
v4tov6(addr, ip4);
if(ipismulticast(addr))
return 0;
- return (ipforme(f, addr) & Runi) != 0;
+ return ipforme(f, addr) == Runi;
}
void
@@ -401,7 +401,7 @@ icmpiput(Proto *icmp, Ipifc*, Block *bp)
break;
case Unreachable:
if(p->code >= nelem(unreachcode)) {
- snprint(m2, sizeof m2, "unreachable %V->%V code %d",
+ snprint(m2, sizeof m2, "unreachable %V -> %V code %d",
p->src, p->dst, p->code);
msg = m2;
} else
@@ -452,7 +452,7 @@ raise:
freeblist(bp);
}
-void
+static void
icmpadvise(Proto *icmp, Block *bp, char *msg)
{
Conv **c, *s;
@@ -478,7 +478,7 @@ icmpadvise(Proto *icmp, Block *bp, char *msg)
freeblist(bp);
}
-int
+static int
icmpstats(Proto *icmp, char *buf, int len)
{
Icmppriv *priv;