Skip to content

Commit

Permalink
freebsd: Fix raw sockets on FreeBSD.
Browse files Browse the repository at this point in the history
Seems I broke this in commit 6711ba5
"raw-sockets:  Assume platforms support raw socket input/output."

Reported, bisected and tested by: Edwin Schokkenbroek

Signed-off-by: Ben Greear <greearb@candelatech.com>
  • Loading branch information
greearb committed Feb 1, 2012
1 parent 641bb62 commit b19a55b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions xorp/site_scons/config/allconfig.py
Expand Up @@ -21,6 +21,7 @@
import os
import string
from SCons.Script.SConscript import SConsEnvironment
import fnmatch;

# TODO SCons support for headerfilename needs to be fixed at source--
# that would let us use confdefs.h for the include file header
Expand Down Expand Up @@ -226,10 +227,11 @@ def DoAllConfig(env, conf, host_os):
if has_af_inet and has_sock_raw:
conf.Define('HAVE_IP_RAW_SOCKETS')
# TODO: This needs to be properly detected.
# TODO: This used to check for bsd and linux in an error prone
# way. Now, do negative checks, but this could break Solaris
# TODO: This used to check for openbsd and linux in an error prone
# way. Now, do negative checks, but this could break Solaris and other OS
# (or not..no idea if it supports raw or not).
if not (env.has_key('mingw') and env['mingw']):
if not ((env.has_key('mingw') and env['mingw']) or
fnmatch.fnmatch(host_os, 'freebsd*')):
conf.Define('IPV4_RAW_OUTPUT_IS_RAW')
conf.Define('IPV4_RAW_INPUT_IS_RAW')

Expand Down

0 comments on commit b19a55b

Please sign in to comment.