diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-12-18 00:40:23 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-12-18 00:40:23 +0000 |
commit | 834b7f36cf4da1f4c08d27f1db9e0eed8717c542 (patch) | |
tree | a5e139487e292868516c463d9d080c35052419a4 /sys/src/9/ip/ethermedium.c | |
parent | 73e115aab038880a68c9f73b5c49d8fa12d0e5e2 (diff) |
devip: fix icmp bugs
icmpdontfrag() was not working properly, need to pass the
gating source interface. in fact, we now always pass the source
interface to all icmp*() functions, which is used to
determine source ip address of the icmp reply.
also dont generate a icmp response for packets going to
non-unicast addresses (such as broadcast).
increase the amount of icmp response payload, but keep
icmp responses below the minimum ipv4 mtu (68 bytes).
regularize icmpv6 function names.
move icmp unreachable codes to icmpv6.c.
provide the mtu value for icmppkttoobig6().
dont advise announced udp connections.
avoid code duplication in icmp.c and icmpv6.c,
by having single send function with type, code and arg
parameters.
maintain statistics for sent ipv4 icmp types.
avoid route lookup in ipout*() by passing Routehint* to
icmpnohost*().
iladvise()... more like ill advice.
Diffstat (limited to 'sys/src/9/ip/ethermedium.c')
-rw-r--r-- | sys/src/9/ip/ethermedium.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/ip/ethermedium.c b/sys/src/9/ip/ethermedium.c index 6a7b19bdd..999a65b5f 100644 --- a/sys/src/9/ip/ethermedium.c +++ b/sys/src/9/ip/ethermedium.c @@ -712,7 +712,7 @@ etherareg(Fs *f, Ipifc *ifc, Iplifc *lifc, uchar *ip) return; if(!lifc->tentative){ - icmpna(f, lifc->local, v6allnodesL, ip, ifc->mac, 1<<5); + icmpna6(f, lifc->local, v6allnodesL, ip, ifc->mac, 1<<5); return; } @@ -726,7 +726,7 @@ etherareg(Fs *f, Ipifc *ifc, Iplifc *lifc, uchar *ip) remroute(f, a, IPallbits, v6Unspecified, IPallbits, ip, Rmulti, ifc, tdad); nexterror(); } - icmpns(f, 0, SRC_UNSPEC, ip, TARG_MULTI, ifc->mac); + icmpns6(f, 0, SRC_UNSPEC, ip, TARG_MULTI, ifc->mac); poperror(); remroute(f, a, IPallbits, v6Unspecified, IPallbits, ip, Rmulti, ifc, tdad); } |