diff options
author | 2008-10-18 12:30:40 +0000 | |
---|---|---|
committer | 2008-10-18 12:30:40 +0000 | |
commit | b3bacb7c3485fa6d97452073aa2585623555c46f (patch) | |
tree | af93a949655c3413011a10bea09186d4bf8ebad9 | |
parent | Revert the change to use pools for <= PAGE_SIZE allocations. It (diff) | |
download | wireguard-openbsd-b3bacb7c3485fa6d97452073aa2585623555c46f.tar.xz wireguard-openbsd-b3bacb7c3485fa6d97452073aa2585623555c46f.zip |
Prevent the user to assign reserved labels to mpe(4) interfaces.
OK claudio@
-rw-r--r-- | sys/net/if_mpe.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c index 892f20cdb1f..518220355d2 100644 --- a/sys/net/if_mpe.c +++ b/sys/net/if_mpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mpe.c,v 1.10 2008/10/14 20:43:33 michele Exp $ */ +/* $OpenBSD: if_mpe.c,v 1.11 2008/10/18 12:30:40 michele Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -247,7 +247,8 @@ mpeioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifm = ifp->if_softc; if ((error = copyin(ifr->ifr_data, &shim, sizeof(shim)))) break; - if (shim.shim_label > MPLS_LABEL_MAX) { + if (shim.shim_label > MPLS_LABEL_MAX || + shim.shim_label <= MPLS_LABEL_RESERVED_MAX) { error = EINVAL; break; } |