diff options
Diffstat (limited to 'proto/ospf/dbdes.c')
-rw-r--r-- | proto/ospf/dbdes.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c index f211935f..2626a24c 100644 --- a/proto/ospf/dbdes.c +++ b/proto/ospf/dbdes.c @@ -14,7 +14,7 @@ struct ospf_dbdes2_packet { struct ospf_packet hdr; - union ospf_auth auth; + union ospf_auth2 auth; u16 iface_mtu; u8 options; @@ -38,6 +38,13 @@ struct ospf_dbdes3_packet }; +uint +ospf_dbdes3_options(struct ospf_packet *pkt) +{ + struct ospf_dbdes3_packet *ps = (void *) pkt; + return ntohl(ps->options); +} + static inline uint ospf_dbdes_hdrlen(struct ospf_proto *p) { @@ -45,7 +52,6 @@ ospf_dbdes_hdrlen(struct ospf_proto *p) sizeof(struct ospf_dbdes2_packet) : sizeof(struct ospf_dbdes3_packet); } - static void ospf_dbdes_body(struct ospf_proto *p, struct ospf_packet *pkt, struct ospf_lsa_header **body, uint *count) @@ -129,7 +135,7 @@ ospf_prepare_dbdes(struct ospf_proto *p, struct ospf_neighbor *n) else /* OSPFv3 */ { struct ospf_dbdes3_packet *ps = (void *) pkt; - ps->options = htonl(ifa->oa->options); + ps->options = htonl(ifa->oa->options | (ifa->autype == OSPF_AUTH_CRYPT ? OPT_AT : 0)); ps->iface_mtu = htons(iface_mtu); ps->padding = 0; ps->imms = 0; /* Will be set later */ |