diff options
| author | 2019-05-10 13:50:34 +0000 | |
|---|---|---|
| committer | 2019-05-10 13:50:34 +0000 | |
| commit | df59d22f03bf66408f8b328b8e7197313efa0630 (patch) | |
| tree | b68a69575ccfaea1063fa061f4d8d0361b8c3f79 /usr.sbin/ospf6d/database.c | |
| parent | ld.so boot cleanup support: (diff) | |
| download | wireguard-openbsd-df59d22f03bf66408f8b328b8e7197313efa0630.tar.xz wireguard-openbsd-df59d22f03bf66408f8b328b8e7197313efa0630.zip | |
When calculating how much payload ospf6d can put into DD and LSREQ packets
substract the size of the IPv6 header and not the IPv4 header from the MTU.
This stops ospf6d to send out fragmented packets.
Found with and OK benno@
Diffstat (limited to 'usr.sbin/ospf6d/database.c')
| -rw-r--r-- | usr.sbin/ospf6d/database.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ospf6d/database.c b/usr.sbin/ospf6d/database.c index 37ad3048762..93f13a01402 100644 --- a/usr.sbin/ospf6d/database.c +++ b/usr.sbin/ospf6d/database.c @@ -1,4 +1,4 @@ -/* $OpenBSD: database.c,v 1.15 2014/10/25 03:23:49 lteo Exp $ */ +/* $OpenBSD: database.c,v 1.16 2019/05/10 13:50:34 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -20,7 +20,7 @@ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> -#include <netinet/ip.h> +#include <netinet/ip6.h> #include <arpa/inet.h> #include <stdlib.h> #include <string.h> @@ -46,7 +46,7 @@ send_db_description(struct nbr *nbr) int ret = 0; u_int8_t bits = 0; - if ((buf = ibuf_open(nbr->iface->mtu - sizeof(struct ip))) == NULL) + if ((buf = ibuf_open(nbr->iface->mtu - sizeof(struct ip6_hdr))) == NULL) fatal("send_db_description"); /* OSPF header */ |
