Fix warnings in ifset.c.
This commit is contained in:
parent
eec497adf5
commit
8a3b875119
@ -47,6 +47,7 @@
|
|||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include "ifset.h"
|
||||||
#include "ifchd.h"
|
#include "ifchd.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
@ -280,6 +281,8 @@ void perform_router(const char *str, size_t len)
|
|||||||
|
|
||||||
if (!str)
|
if (!str)
|
||||||
return;
|
return;
|
||||||
|
if (len < 4)
|
||||||
|
return;
|
||||||
if (inet_pton(AF_INET, str, &router) <= 0)
|
if (inet_pton(AF_INET, str, &router) <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -322,6 +325,8 @@ void perform_mtu(const char *str, size_t len)
|
|||||||
|
|
||||||
if (!str)
|
if (!str)
|
||||||
return;
|
return;
|
||||||
|
if (len < 2)
|
||||||
|
return;
|
||||||
|
|
||||||
mtu = strtol(str, NULL, 10);
|
mtu = strtol(str, NULL, 10);
|
||||||
// Minimum MTU for physical IPv4 links is 576 octets.
|
// Minimum MTU for physical IPv4 links is 576 octets.
|
||||||
|
Loading…
Reference in New Issue
Block a user