]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Ignore RTM versions we don't know.
authorRoy Marples <roy@marples.name>
Thu, 15 Sep 2016 10:36:58 +0000 (10:36 +0000)
committerRoy Marples <roy@marples.name>
Thu, 15 Sep 2016 10:36:58 +0000 (10:36 +0000)
if-bsd.c
if-sun.c

index c8ed3029dbc9391ce290143d6d43def5c0d9fd81..8f072968ae786bccfe928018ea7bdb2b8416c8c4 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -1502,6 +1502,9 @@ static void
 if_dispatch(struct dhcpcd_ctx *ctx, const struct rt_msghdr *rtm)
 {
 
+       if (rtm->rtm_version != RTM_VERSION)
+               return;
+
        switch(rtm->rtm_type) {
 #ifdef RTM_IFANNOUNCE
        case RTM_IFANNOUNCE:
index a26d4c6bacdbdbf3ad4d7402bc98db62845ea05d..39285e926f836072365b92e63445ee2e732af5f7 100644 (file)
--- a/if-sun.c
+++ b/if-sun.c
@@ -749,6 +749,9 @@ static void
 if_dispatch(struct dhcpcd_ctx *ctx, const struct rt_msghdr *rtm)
 {
 
+       if (rtm->rtm_version != RTM_VERSION)
+               return;
+
        switch(rtm->rtm_type) {
        case RTM_IFINFO:
                if_ifinfo(ctx, (const void *)rtm);