diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-12-19 17:48:36 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-17 02:27:08 +0200 |
commit | 91188ca6c19868cfbf45df693cc599c3850f6526 (patch) | |
tree | 0e341f4e0122c5d241b560a5d2882aed995b71ae /vrrpd/vrrp.h | |
parent | vrrpd: ipv6 support (diff) | |
download | frr-91188ca6c19868cfbf45df693cc599c3850f6526.tar.xz frr-91188ca6c19868cfbf45df693cc599c3850f6526.zip |
vrrpd: read and validate vrrp advertisements
* Validate IPvX headers and packet contents
* Remove filter of non-255 TTL IPv4 packets; better to receive, log and
drop them ourselves
* Set outgoing packet TTL / hop limit to 255
* Use existing sockopt functions
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vrrpd/vrrp.h')
-rw-r--r-- | vrrpd/vrrp.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vrrpd/vrrp.h b/vrrpd/vrrp.h index 12789d510..64e29eec0 100644 --- a/vrrpd/vrrp.h +++ b/vrrpd/vrrp.h @@ -21,12 +21,14 @@ #define _VRRP_H #include <zebra.h> +#include <netinet/ip.h> #include "lib/hash.h" #include "lib/hook.h" #include "lib/if.h" #include "lib/linklist.h" #include "lib/privs.h" +#include "lib/stream.h" #include "lib/thread.h" /* Global definitions */ @@ -65,6 +67,9 @@ struct vrrp_router { /* Socket */ int sock; + /* Socket read buffer */ + uint8_t ibuf[IP_MAXPACKET]; + /* * Address family of this Virtual Router. * Either AF_INET or AF_INET6. @@ -125,6 +130,8 @@ struct vrrp_router { struct thread *t_master_down_timer; struct thread *t_adver_timer; + struct thread *t_read; + struct thread *t_write; }; /* @@ -148,6 +155,9 @@ struct vrrp_vrouter { /* Interface */ struct interface *ifp; + /* Version */ + uint8_t version; + /* Virtual Router Identifier */ uint32_t vrid; |