gdhcp: Message type is required in DHCPv4
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Thu, 10 May 2012 13:21:52 +0000 (16:21 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 11 May 2012 07:19:31 +0000 (10:19 +0300)
gdhcp/client.c

index c308b83..a51857f 100644 (file)
@@ -1897,8 +1897,11 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
                } else
                        dhcp_client->status_code = 0;
 
-       } else
+       } else {
                message_type = dhcp_get_option(&packet, DHCP_MESSAGE_TYPE);
+               if (message_type == NULL)
+                       return TRUE;
+       }
 
        if (message_type == NULL && client_id == NULL)
                /* No message type / client id option, ignore package */