diff options
author | brian <brian@FreeBSD.org> | 2004-07-08 13:40:33 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2004-07-08 13:40:33 +0000 |
commit | 2821a50eaafae3e4c7204aef9e58c6f40d221bbb (patch) | |
tree | ebac46b3b358807a8144fabd366380413a43366c /sys/netinet/ip_input.c | |
parent | 7c245468ef2fa07526f2540ec91012b5c7f4e9c8 (diff) | |
download | FreeBSD-src-2821a50eaafae3e4c7204aef9e58c6f40d221bbb.zip FreeBSD-src-2821a50eaafae3e4c7204aef9e58c6f40d221bbb.tar.gz |
Change the following kernel options to environment variables:
BOOTP -> bootp
BOOTP_NFSROOT -> bootp.nfsroot
BOOTP_NFSV3 -> bootp.nfsv3
BOOTP_COMPAT -> bootp.compat
BOOTP_WIRED_TO -> bootp.wired_to
This lets you PXE boot with a GENERIC kernel by putting this sort of thing
in loader.conf:
bootp="YES"
bootp.nfsroot="YES"
bootp.nfsv3="YES"
bootp.wired_to="bge1"
or even setting the variables manually from the OK prompt.
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 048f613..77c8c79 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -30,7 +30,6 @@ * $FreeBSD$ */ -#include "opt_bootp.h" #include "opt_ipfw.h" #include "opt_ipdn.h" #include "opt_ipdivert.h" @@ -299,6 +298,7 @@ ip_input(struct mbuf *m) struct ipq *fp; struct in_ifaddr *ia = NULL; struct ifaddr *ifa; + char *cp; int i, checkif, hlen = 0; u_short sum; struct in_addr pkt_dst; @@ -598,10 +598,11 @@ pass: goto ours; if (ia->ia_netbroadcast.s_addr == pkt_dst.s_addr) goto ours; -#ifdef BOOTP_COMPAT - if (IA_SIN(ia)->sin_addr.s_addr == INADDR_ANY) - goto ours; -#endif + if ((cp = getenv("bootp.compat")) != NULL) { + freeenv(cp); + if (IA_SIN(ia)->sin_addr.s_addr == INADDR_ANY) + goto ours; + } } } if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { |