diff options
author | Cody Peter Mello <cody.mello@joyent.com> | 2016-02-25 22:30:47 +0000 |
---|---|---|
committer | Cody Peter Mello <cody.mello@joyent.com> | 2016-03-18 18:12:59 +0000 |
commit | 8913b855787a36cb17b87a645af0c15fcb28aa12 (patch) | |
tree | a18563f1fac773ced79242f0dcc082962c622767 /usr/src/uts/common/sys | |
parent | 92004ccfbcbbcc49104f719ffe2a12c724e76c4a (diff) | |
download | illumos-joyent-OS-4683.tar.gz |
OS-4683 Using the allowed-ips property prevents using dynamic addressesOS-4683
Diffstat (limited to 'usr/src/uts/common/sys')
-rw-r--r-- | usr/src/uts/common/sys/dld.h | 8 | ||||
-rw-r--r-- | usr/src/uts/common/sys/mac_client_priv.h | 3 | ||||
-rw-r--r-- | usr/src/uts/common/sys/mac_flow.h | 10 |
3 files changed, 20 insertions, 1 deletions
diff --git a/usr/src/uts/common/sys/dld.h b/usr/src/uts/common/sys/dld.h index 4cd93be56e..b104cdfeef 100644 --- a/usr/src/uts/common/sys/dld.h +++ b/usr/src/uts/common/sys/dld.h @@ -21,7 +21,7 @@ /* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright 2011 Joyent, Inc. All rights reserved. + * Copyright 2016 Joyent, Inc. All rights reserved. */ #ifndef _SYS_DLD_H @@ -327,6 +327,7 @@ typedef struct dld_hwgrpinfo { #define DLD_CAPAB_POLL 0x00000002 #define DLD_CAPAB_PERIM 0x00000003 #define DLD_CAPAB_LSO 0x00000004 +#define DLD_CAPAB_IPCHECK 0x00000005 #define DLD_ENABLE 0x00000001 #define DLD_DISABLE 0x00000002 @@ -383,6 +384,11 @@ typedef struct dld_capab_direct_s { uint_t di_flags; } dld_capab_direct_t; +typedef struct dld_capab_ipcheck_s { + uintptr_t ipc_allowed_df; + void *ipc_allowed_dh; +} dld_capab_ipcheck_t; + /* * Polling/softring capability. */ diff --git a/usr/src/uts/common/sys/mac_client_priv.h b/usr/src/uts/common/sys/mac_client_priv.h index a5848625c2..b9fbe6c9ac 100644 --- a/usr/src/uts/common/sys/mac_client_priv.h +++ b/usr/src/uts/common/sys/mac_client_priv.h @@ -58,6 +58,9 @@ extern const mac_info_t *mac_info(mac_handle_t); extern boolean_t mac_info_get(const char *, mac_info_t *); extern boolean_t mac_promisc_get(mac_handle_t); +extern boolean_t mac_protect_check_addr(mac_client_handle_t, boolean_t, + in6_addr_t *); + extern int mac_start(mac_handle_t); extern void mac_stop(mac_handle_t); diff --git a/usr/src/uts/common/sys/mac_flow.h b/usr/src/uts/common/sys/mac_flow.h index b81acbae23..69b6c95834 100644 --- a/usr/src/uts/common/sys/mac_flow.h +++ b/usr/src/uts/common/sys/mac_flow.h @@ -155,6 +155,15 @@ typedef enum { #define MPT_MAXCID MPT_MAXCNT #define MPT_MAXCIDLEN 256 +/* Dynamic address detection types */ +#define MPT_DYN_DHCPV4 0x00000001 +#define MPT_DYN_DHCPV6 0x00000002 +#define MPT_DYN_SLAAC 0x00000004 +#define MPT_DYN_ALL 0x00000007 + +#define MPT_DYN_ISSET(mpt, method) \ + ((mpt->mp_dynamic & method) != 0 || mpt->mp_ipaddrcnt == 0) + typedef struct mac_ipaddr_s { uint32_t ip_version; in6_addr_t ip_addr; @@ -180,6 +189,7 @@ typedef struct mac_protect_s { uint32_t mp_cidcnt; /* Count of allowed DHCP CIDs */ mac_dhcpcid_t mp_cids[MPT_MAXCID]; /* Allowed DHCP CIDs */ boolean_t mp_allcids; /* Whether to allow all CIDs through */ + uint32_t mp_dynamic; /* Enabled dynamic address methods */ } mac_protect_t; /* The default priority for links */ |