diff options
| author | Siger Yang <siger.yang@outlook.com> | 2022-11-25 13:52:46 +0800 | 
|---|---|---|
| committer | Siger Yang <siger.yang@outlook.com> | 2022-11-25 16:21:59 +0800 | 
| commit | 9f2379bdd2d832370588d3ace1dde591b68cdcaf (patch) | |
| tree | 5a2b4f695191d5c699094e5804abd9def438c5a5 /vrrpd/vrrp_packet.h | |
| parent | 89f74214e7d109f7ff48c9666dab65b741636a09 (diff) | |
vrrpd: add IPv4 pseudoheader option for VRRPv3
This commit adds a new option to control whether a VRRPv3 group
accepts / computes its checksum with a prepended IPv4 pseudoheader.
This should improve interoperability with other devices.
Signed-off-by: Siger Yang <siger.yang@outlook.com>
Diffstat (limited to 'vrrpd/vrrp_packet.h')
| -rw-r--r-- | vrrpd/vrrp_packet.h | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/vrrpd/vrrp_packet.h b/vrrpd/vrrp_packet.h index 082935f080..eec709593e 100644 --- a/vrrpd/vrrp_packet.h +++ b/vrrpd/vrrp_packet.h @@ -131,7 +131,7 @@ struct vrrp_pkt {  ssize_t vrrp_pkt_adver_build(struct vrrp_pkt **pkt, struct ipaddr *src,  			     uint8_t version, uint8_t vrid, uint8_t prio,  			     uint16_t max_adver_int, uint8_t numip, -			     struct ipaddr **ips); +			     struct ipaddr **ips, bool ipv4_ph);  /* free memory allocated by vrrp_pkt_adver_build's pkt arg */  void vrrp_pkt_free(struct vrrp_pkt *pkt); @@ -195,9 +195,9 @@ size_t vrrp_pkt_adver_dump(char *buf, size_t buflen, struct vrrp_pkt *pkt);   * Returns:   *    Size of VRRP packet, or -1 upon error   */ -ssize_t vrrp_pkt_parse_datagram(int family, int version, struct msghdr *m, -				size_t read, struct ipaddr *src, -				struct vrrp_pkt **pkt, char *errmsg, -				size_t errmsg_len); +ssize_t vrrp_pkt_parse_datagram(int family, int version, bool ipv4_ph, +				struct msghdr *m, size_t read, +				struct ipaddr *src, struct vrrp_pkt **pkt, +				char *errmsg, size_t errmsg_len);  #endif /* __VRRP_PACKET_H__ */  | 
