doc/LinuxDocTools.pm | 2 +- proto/ospf/packet.c | 6 +++--- sysdep/unix/krt.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/LinuxDocTools.pm b/doc/LinuxDocTools.pm index d32f3171..cbd92ab0 100644 --- a/doc/LinuxDocTools.pm +++ b/doc/LinuxDocTools.pm @@ -380,7 +380,7 @@ sub process_file # # You can hack $NsgmlsOpts here, etcetera. # - $global->{NsgmlsOpts} .= "-D $main::prefix/share/sgml -D $main::DataDir"; + $global->{NsgmlsOpts} .= "-D $main::prefix/share/sgml -D $main::DataDir -E 1000"; $global->{NsgmlsOpts} .= "-i$global->{include}" if ($global->{include}); $global->{NsgmlsPrePipe} = "NOTHING"; if ( defined $Formats{$global->{format}}{preNSGMLS} ) diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c index ef843a22..47c8771e 100644 --- a/proto/ospf/packet.c +++ b/proto/ospf/packet.c @@ -281,7 +281,8 @@ ospf_rx_hook(sock *sk, uint len) DROP("version mismatch", pkt->version); uint plen = ntohs(pkt->length); - if ((plen < sizeof(struct ospf_packet)) || ((plen % 4) != 0)) + uint hlen = sizeof(struct ospf_packet) + (ospf_is_v2(p) ? sizeof(union ospf_auth) : 0); + if ((plen < hlen) || ((plen % 4) != 0)) DROP("invalid length", plen); if (sk->flags & SKF_TRUNCATED) @@ -302,9 +303,8 @@ ospf_rx_hook(sock *sk, uint len) if (ospf_is_v2(p) && (pkt->autype != OSPF_AUTH_CRYPT)) { - uint hlen = sizeof(struct ospf_packet) + sizeof(union ospf_auth); - uint blen = plen - hlen; void *body = ((void *) pkt) + hlen; + uint blen = plen - hlen; if (!ipsum_verify(pkt, sizeof(struct ospf_packet), body, blen, NULL)) DROP1("invalid checksum"); diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h index d4a8717e..fe79efc3 100644 --- a/sysdep/unix/krt.h +++ b/sysdep/unix/krt.h @@ -112,7 +112,7 @@ struct kif_proto { struct kif_state sys; /* Sysdep state */ }; -struct kif_proto *kif_proto; +extern struct kif_proto *kif_proto; #define KIF_CF ((struct kif_config *)p->p.cf)