Skip to content

Commit

Permalink
Merge branch 'master' of github.com:greearb/xorp.ct
Browse files Browse the repository at this point in the history
  • Loading branch information
greearb committed Oct 3, 2011
2 parents 20ce2c0 + d0b51ad commit 544f767
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions xorp/fea/data_plane/ifconfig/ifconfig_vlan_get_linux.cc
Expand Up @@ -38,6 +38,9 @@
#ifdef HAVE_NET_IF_VLAN_VAR_H
#include <net/if_vlan_var.h>
#endif
#ifdef HAVE_NET_IF_VLANVAR_H
#include <net/if_vlanvar.h>
#endif

#include "fea/ifconfig.hh"
#include "ifconfig_vlan_get_linux.hh"
Expand Down
8 changes: 6 additions & 2 deletions xorp/fea/data_plane/ifconfig/ifconfig_vlan_set_linux.cc
Expand Up @@ -43,6 +43,10 @@
#ifdef HAVE_NET_IF_VLAN_VAR_H
#include <net/if_vlan_var.h>
#endif
#ifdef HAVE_NET_IF_VLANVAR_H
#include <net/if_vlanvar.h>
#endif


#include "fea/ifconfig.hh"
#include "ifconfig_vlan_set_linux.hh"
Expand Down Expand Up @@ -256,7 +260,7 @@ IfConfigVlanSetLinux::add_vlan(const string& parent_ifname,
//
if (result < 0) {
error_msg = c_format("Cannot create VLAN interface %s: %s errno: %i",
vlan_name.c_str(), strerror(saved_errno), saved_errno);
vlan_name.c_str(), strerror(errno), errno);
return (XORP_ERROR);
}
// XXX: The created name didn't match
Expand All @@ -265,7 +269,7 @@ IfConfigVlanSetLinux::add_vlan(const string& parent_ifname,
"the created name (%s) doesn't match",
vlan_name.c_str(), ifreq.ifr_name);
string dummy_error_msg;
delete_vlan(parent_ifname, string(ifreq.ifr_name), dummy_error_msg);
delete_vlan(vlan_name, dummy_error_msg);
return (XORP_ERROR);

#else // SIOCSIFNAME
Expand Down
2 changes: 1 addition & 1 deletion xorp/site_scons/config/allconfig.py
Expand Up @@ -765,7 +765,7 @@ def DoAllConfig(env, conf, host_os):
if not conf.CheckDeclaration('GET_VLAN_VID_CMD', '#include <linux/if_vlan.h>'):
conf.Define('GET_VLAN_VID_CMD', '9')
else:
if not (env.has_key('mingw') and env['mingw']):
if has_net_if_vlanvar_h or has_net_if_vlan_var_h:
conf.Define('HAVE_VLAN_BSD')


Expand Down

0 comments on commit 544f767

Please sign in to comment.