diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-12-13 22:23:01 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-12-13 22:23:01 +0000 |
commit | 074b691f16faba137ab9cb48471fc3160b33da40 (patch) | |
tree | 1fd8f9a2342185717d541655fc74347b5f570f56 /sys/src/9/ip/igmp.c | |
parent | 5f42bde60275e9a0c3d317ee1e052e1aefdcdb19 (diff) |
devip: tcpmssclamp() to minimum of source and destination interface MTU
We used to only clamp to the MTU of the destination interface,
but this is wrong. We have to clamp to the minimum of both
source and destination.
For this, we change the gating argument type of ipoput4()
and ipoput6() from int to Ipifc* to pass the source interface.
Diffstat (limited to 'sys/src/9/ip/igmp.c')
-rw-r--r-- | sys/src/9/ip/igmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/ip/igmp.c b/sys/src/9/ip/igmp.c index 6122b28e8..1ba28f16a 100644 --- a/sys/src/9/ip/igmp.c +++ b/sys/src/9/ip/igmp.c @@ -121,7 +121,7 @@ igmpsendreport(Fs *f, uchar *src, uchar *dst, uchar *group, int done) p->proto = IP_IGMPPROTO; memmove(p->group, group+IPv4off, IPv4addrlen); hnputs(p->igmpcksum, ptclcsum(bp, IGMP_IPHDRSIZE, IGMP_HDRSIZE)); - ipoput4(f, bp, 0, 1, DFLTTOS, nil); /* TTL of 1 */ + ipoput4(f, bp, nil, 1, DFLTTOS, nil); /* TTL of 1 */ } static void @@ -160,7 +160,7 @@ mldsendreport(Fs *f, uchar *src, uchar *dst, uchar *group, int done) p->proto = IP_MLDPROTO; hnputs(p->ploadlen, BLEN(bp) - IP6HDR); - ipoput6(f, bp, 0, 1, DFLTTOS, nil); /* TTL of 1 */ + ipoput6(f, bp, nil, 1, DFLTTOS, nil); /* TTL of 1 */ } static void |