Enforce minimum physical MTU in ifchd.

Skip zero-length commands in execute_buffer().
This commit is contained in:
Nicholas J. Kain
2012-07-20 20:37:41 -04:00
parent 2bf7306bb9
commit 87db9c70fd
2 changed files with 7 additions and 3 deletions

View File

@ -279,6 +279,9 @@ void perform_mtu(struct ifchd_client *cl, char *str)
return;
mtu = strtol(str, NULL, 10);
// Minimum MTU for physical IPv4 links is 576 octets.
if (mtu < 576)
return;
ifrt.ifr_mtu = mtu;
strlcpy(ifrt.ifr_name, cl->ifnam, IFNAMSIZ);