Commit a8fc0d9b authored by Patrick McHardy's avatar Patrick McHardy

Merge branch 'master' of git://dev.medozas.de/linux

parents 94b27cc3 0b8ad876
......@@ -56,6 +56,8 @@ header-y += xt_rateest.h
header-y += xt_realm.h
header-y += xt_recent.h
header-y += xt_sctp.h
header-y += xt_secmark.h
header-y += xt_socket.h
header-y += xt_state.h
header-y += xt_statistic.h
header-y += xt_string.h
......
......@@ -24,24 +24,24 @@
/* ui has one byte ctrl, ni has two */
struct hdr_ui {
uint8_t dsap;
uint8_t ssap;
uint8_t ctrl;
uint8_t orig[3];
__u8 dsap;
__u8 ssap;
__u8 ctrl;
__u8 orig[3];
__be16 type;
};
struct hdr_ni {
uint8_t dsap;
uint8_t ssap;
__u8 dsap;
__u8 ssap;
__be16 ctrl;
uint8_t orig[3];
__u8 orig[3];
__be16 type;
};
struct ebt_802_3_hdr {
uint8_t daddr[6];
uint8_t saddr[6];
__u8 daddr[6];
__u8 saddr[6];
__be16 len;
union {
struct hdr_ui ui;
......@@ -59,10 +59,10 @@ static inline struct ebt_802_3_hdr *ebt_802_3_hdr(const struct sk_buff *skb)
#endif
struct ebt_802_3_info {
uint8_t sap;
__u8 sap;
__be16 type;
uint8_t bitmask;
uint8_t invflags;
__u8 bitmask;
__u8 invflags;
};
#endif
......@@ -30,7 +30,7 @@
*/
struct ebt_mac_wormhash_tuple {
uint32_t cmp[2];
__u32 cmp[2];
__be32 ip;
};
......
......@@ -27,8 +27,8 @@ struct ebt_arp_info
unsigned char smmsk[ETH_ALEN];
unsigned char dmaddr[ETH_ALEN];
unsigned char dmmsk[ETH_ALEN];
uint8_t bitmask;
uint8_t invflags;
__u8 bitmask;
__u8 invflags;
};
#endif
......@@ -31,12 +31,12 @@ struct ebt_ip_info {
__be32 daddr;
__be32 smsk;
__be32 dmsk;
uint8_t tos;
uint8_t protocol;
uint8_t bitmask;
uint8_t invflags;
uint16_t sport[2];
uint16_t dport[2];
__u8 tos;
__u8 protocol;
__u8 bitmask;
__u8 invflags;
__u16 sport[2];
__u16 dport[2];
};
#endif
......@@ -31,17 +31,17 @@ struct ebt_ip6_info {
struct in6_addr daddr;
struct in6_addr smsk;
struct in6_addr dmsk;
uint8_t tclass;
uint8_t protocol;
uint8_t bitmask;
uint8_t invflags;
__u8 tclass;
__u8 protocol;
__u8 bitmask;
__u8 invflags;
union {
uint16_t sport[2];
uint8_t icmpv6_type[2];
__u16 sport[2];
__u8 icmpv6_type[2];
};
union {
uint16_t dport[2];
uint8_t icmpv6_code[2];
__u16 dport[2];
__u8 icmpv6_code[2];
};
};
......
......@@ -10,13 +10,13 @@
seconds, or one every 59 hours. */
struct ebt_limit_info {
u_int32_t avg; /* Average secs between packets * scale */
u_int32_t burst; /* Period multiplier for upper limit. */
__u32 avg; /* Average secs between packets * scale */
__u32 burst; /* Period multiplier for upper limit. */
/* Used internally by the kernel */
unsigned long prev;
u_int32_t credit;
u_int32_t credit_cap, cost;
__u32 credit;
__u32 credit_cap, cost;
};
#endif
......@@ -10,9 +10,9 @@
#define EBT_LOG_WATCHER "log"
struct ebt_log_info {
uint8_t loglevel;
uint8_t prefix[EBT_LOG_PREFIX_SIZE];
uint32_t bitmask;
__u8 loglevel;
__u8 prefix[EBT_LOG_PREFIX_SIZE];
__u32 bitmask;
};
#endif
......@@ -6,8 +6,8 @@
#define EBT_MARK_MASK (EBT_MARK_AND | EBT_MARK_OR)
struct ebt_mark_m_info {
unsigned long mark, mask;
uint8_t invert;
uint8_t bitmask;
__u8 invert;
__u8 bitmask;
};
#define EBT_MARK_MATCH "mark_m"
......
......@@ -10,11 +10,11 @@
#define EBT_NFLOG_DEFAULT_THRESHOLD 1
struct ebt_nflog_info {
u_int32_t len;
u_int16_t group;
u_int16_t threshold;
u_int16_t flags;
u_int16_t pad;
__u32 len;
__u16 group;
__u16 threshold;
__u16 flags;
__u16 pad;
char prefix[EBT_NFLOG_PREFIX_SIZE];
};
......
......@@ -2,8 +2,8 @@
#define __LINUX_BRIDGE_EBT_PKTTYPE_H
struct ebt_pkttype_info {
uint8_t pkt_type;
uint8_t invert;
__u8 pkt_type;
__u8 invert;
};
#define EBT_PKTTYPE_MATCH "pkttype"
......
......@@ -21,24 +21,24 @@
#define EBT_STP_MATCH "stp"
struct ebt_stp_config_info {
uint8_t flags;
uint16_t root_priol, root_priou;
__u8 flags;
__u16 root_priol, root_priou;
char root_addr[6], root_addrmsk[6];
uint32_t root_costl, root_costu;
uint16_t sender_priol, sender_priou;
__u32 root_costl, root_costu;
__u16 sender_priol, sender_priou;
char sender_addr[6], sender_addrmsk[6];
uint16_t portl, portu;
uint16_t msg_agel, msg_ageu;
uint16_t max_agel, max_ageu;
uint16_t hello_timel, hello_timeu;
uint16_t forward_delayl, forward_delayu;
__u16 portl, portu;
__u16 msg_agel, msg_ageu;
__u16 max_agel, max_ageu;
__u16 hello_timel, hello_timeu;
__u16 forward_delayl, forward_delayu;
};
struct ebt_stp_info {
uint8_t type;
__u8 type;
struct ebt_stp_config_info config;
uint16_t bitmask;
uint16_t invflags;
__u16 bitmask;
__u16 invflags;
};
#endif
......@@ -10,7 +10,7 @@
#define EBT_ULOG_VERSION 1
struct ebt_ulog_info {
uint32_t nlgroup;
__u32 nlgroup;
unsigned int cprange;
unsigned int qthreshold;
char prefix[EBT_ULOG_PREFIX_LEN];
......
......@@ -8,12 +8,12 @@
#define EBT_VLAN_MATCH "vlan"
struct ebt_vlan_info {
uint16_t id; /* VLAN ID {1-4095} */
uint8_t prio; /* VLAN User Priority {0-7} */
__u16 id; /* VLAN ID {1-4095} */
__u8 prio; /* VLAN User Priority {0-7} */
__be16 encap; /* VLAN Encapsulated frame code {0-65535} */
uint8_t bitmask; /* Args bitmask bit 1=1 - ID arg,
__u8 bitmask; /* Args bitmask bit 1=1 - ID arg,
bit 2=1 User-Priority arg, bit 3=1 encap*/
uint8_t invflags; /* Inverse bitmask bit 1=1 - inversed ID arg,
__u8 invflags; /* Inverse bitmask bit 1=1 - inversed ID arg,
bit 2=1 - inversed Pirority arg */
};
......
......@@ -17,15 +17,15 @@ struct clusterip_config;
struct ipt_clusterip_tgt_info {
u_int32_t flags;
__u32 flags;
/* only relevant for new ones */
u_int8_t clustermac[6];
u_int16_t num_total_nodes;
u_int16_t num_local_nodes;
u_int16_t local_nodes[CLUSTERIP_MAX_NODES];
u_int32_t hash_mode;
u_int32_t hash_initval;
__u8 clustermac[6];
__u16 num_total_nodes;
__u16 num_local_nodes;
__u16 local_nodes[CLUSTERIP_MAX_NODES];
__u32 hash_mode;
__u32 hash_initval;
/* Used internally by the kernel */
struct clusterip_config *config;
......
......@@ -19,11 +19,11 @@
#define IPT_ECN_OP_MASK 0xce
struct ipt_ECN_info {
u_int8_t operation; /* bitset of operations */
u_int8_t ip_ect; /* ECT codepoint of IPv4 header, pre-shifted */
__u8 operation; /* bitset of operations */
__u8 ip_ect; /* ECT codepoint of IPv4 header, pre-shifted */
union {
struct {
u_int8_t ece:1, cwr:1; /* TCP ECT bits */
__u8 ece:1, cwr:1; /* TCP ECT bits */
} tcp;
} proto;
};
......
......@@ -7,9 +7,9 @@
struct ipt_same_info {
unsigned char info;
u_int32_t rangesize;
u_int32_t ipnum;
u_int32_t *iparray;
__u32 rangesize;
__u32 ipnum;
__u32 *iparray;
/* hangs off end. */
struct nf_nat_range range[IPT_SAME_MAX_RANGE];
......
......@@ -13,8 +13,8 @@ enum {
#define IPT_TTL_MAXMODE IPT_TTL_DEC
struct ipt_TTL_info {
u_int8_t mode;
u_int8_t ttl;
__u8 mode;
__u8 ttl;
};
......
......@@ -9,17 +9,17 @@ enum {
};
struct ipt_addrtype_info_v1 {
u_int16_t source; /* source-type mask */
u_int16_t dest; /* dest-type mask */
u_int32_t flags;
__u16 source; /* source-type mask */
__u16 dest; /* dest-type mask */
__u32 flags;
};
/* revision 0 */
struct ipt_addrtype_info {
u_int16_t source; /* source-type mask */
u_int16_t dest; /* dest-type mask */
u_int32_t invert_source;
u_int32_t invert_dest;
__u16 source; /* source-type mask */
__u16 dest; /* dest-type mask */
__u32 invert_source;
__u32 invert_dest;
};
#endif
......@@ -2,8 +2,8 @@
#define _IPT_AH_H
struct ipt_ah {
u_int32_t spis[2]; /* Security Parameter Index */
u_int8_t invflags; /* Inverse flags */
__u32 spis[2]; /* Security Parameter Index */
__u8 invflags; /* Inverse flags */
};
......
......@@ -20,12 +20,12 @@
/* match info */
struct ipt_ecn_info {
u_int8_t operation;
u_int8_t invert;
u_int8_t ip_ect;
__u8 operation;
__u8 invert;
__u8 ip_ect;
union {
struct {
u_int8_t ect;
__u8 ect;
} tcp;
} proto;
};
......
......@@ -13,8 +13,8 @@ enum {
struct ipt_ttl_info {
u_int8_t mode;
u_int8_t ttl;
__u8 mode;
__u8 ttl;
};
......
......@@ -14,8 +14,8 @@ enum {
#define IP6T_HL_MAXMODE IP6T_HL_DEC
struct ip6t_HL_info {
u_int8_t mode;
u_int8_t hop_limit;
__u8 mode;
__u8 hop_limit;
};
......
......@@ -12,7 +12,7 @@ enum ip6t_reject_with {
};
struct ip6t_reject_info {
u_int32_t with; /* reject type */
__u32 with; /* reject type */
};
#endif /*_IP6T_REJECT_H*/
......@@ -2,10 +2,10 @@
#define _IP6T_AH_H
struct ip6t_ah {
u_int32_t spis[2]; /* Security Parameter Index */
u_int32_t hdrlen; /* Header Length */
u_int8_t hdrres; /* Test of the Reserved Filed */
u_int8_t invflags; /* Inverse flags */
__u32 spis[2]; /* Security Parameter Index */
__u32 hdrlen; /* Header Length */
__u8 hdrres; /* Test of the Reserved Filed */
__u8 invflags; /* Inverse flags */
};
#define IP6T_AH_SPI 0x01
......
......@@ -2,10 +2,10 @@
#define _IP6T_FRAG_H
struct ip6t_frag {
u_int32_t ids[2]; /* Security Parameter Index */
u_int32_t hdrlen; /* Header Length */
u_int8_t flags; /* */
u_int8_t invflags; /* Inverse flags */
__u32 ids[2]; /* Security Parameter Index */
__u32 hdrlen; /* Header Length */
__u8 flags; /* */
__u8 invflags; /* Inverse flags */
};
#define IP6T_FRAG_IDS 0x01
......
......@@ -14,8 +14,8 @@ enum {
struct ip6t_hl_info {
u_int8_t mode;
u_int8_t hop_limit;
__u8 mode;
__u8 hop_limit;
};
......
......@@ -9,9 +9,9 @@ on whether they contain certain headers */
#define __IPV6HEADER_H
struct ip6t_ipv6header_info {
u_int8_t matchflags;
u_int8_t invflags;
u_int8_t modeflag;
__u8 matchflags;
__u8 invflags;
__u8 modeflag;
};
#define MASK_HOPOPTS 128
......
......@@ -3,8 +3,8 @@
/* MH matching stuff */
struct ip6t_mh {
u_int8_t types[2]; /* MH type range */
u_int8_t invflags; /* Inverse flags */
__u8 types[2]; /* MH type range */
__u8 invflags; /* Inverse flags */
};
/* Values for "invflags" field in struct ip6t_mh. */
......
......@@ -4,11 +4,11 @@
#define IP6T_OPTS_OPTSNR 16
struct ip6t_opts {
u_int32_t hdrlen; /* Header Length */
u_int8_t flags; /* */
u_int8_t invflags; /* Inverse flags */
u_int16_t opts[IP6T_OPTS_OPTSNR]; /* opts */
u_int8_t optsnr; /* Nr of OPts */
__u32 hdrlen; /* Header Length */
__u8 flags; /* */
__u8 invflags; /* Inverse flags */
__u16 opts[IP6T_OPTS_OPTSNR]; /* opts */
__u8 optsnr; /* Nr of OPts */
};
#define IP6T_OPTS_LEN 0x01
......
......@@ -6,13 +6,13 @@
#define IP6T_RT_HOPS 16
struct ip6t_rt {
u_int32_t rt_type; /* Routing Type */
u_int32_t segsleft[2]; /* Segments Left */
u_int32_t hdrlen; /* Header Length */
u_int8_t flags; /* */
u_int8_t invflags; /* Inverse flags */
__u32 rt_type; /* Routing Type */
__u32 segsleft[2]; /* Segments Left */
__u32 hdrlen; /* Header Length */
__u8 flags; /* */
__u8 invflags; /* Inverse flags */
struct in6_addr addrs[IP6T_RT_HOPS]; /* Hops */
u_int8_t addrnr; /* Nr of Addresses */
__u8 addrnr; /* Nr of Addresses */
};
#define IP6T_RT_TYP 0x01
......
......@@ -74,6 +74,8 @@ static int audit_initialized;
int audit_enabled;
int audit_ever_enabled;
EXPORT_SYMBOL_GPL(audit_enabled);
/* Default state when kernel boots without any parameters. */
static int audit_default;
......
......@@ -313,3 +313,5 @@ MODULE_AUTHOR("Timo Teras <ext-timo.teras@nokia.com>");
MODULE_AUTHOR("Luciano Coelho <luciano.coelho@nokia.com>");
MODULE_DESCRIPTION("Xtables: idle time monitor");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("ipt_IDLETIMER");
MODULE_ALIAS("ip6t_IDLETIMER");
......@@ -31,6 +31,8 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Adam Nielsen <a.nielsen@shikadi.net>");
MODULE_DESCRIPTION("Xtables: trigger LED devices on packet match");
MODULE_ALIAS("ipt_LED");
MODULE_ALIAS("ip6t_LED");
static LIST_HEAD(xt_led_triggers);
static DEFINE_MUTEX(xt_led_mutex);
......
......@@ -204,11 +204,9 @@ connlimit_mt(const struct sk_buff *skb, struct xt_action_param *par)
&info->mask, par->family);
spin_unlock_bh(&info->data->lock);
if (connections < 0) {
if (connections < 0)
/* kmalloc failed, drop it entirely */
par->hotdrop = true;
return false;
}
goto hotdrop;
return (connections > info->limit) ^ info->inverse;
......
......@@ -22,6 +22,8 @@
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Eric Dumazet <eric.dumazet@gmail.com>");
MODULE_DESCRIPTION("Xtables: CPU match");
MODULE_ALIAS("ipt_cpu");
MODULE_ALIAS("ip6t_cpu");
static int cpu_mt_check(const struct xt_mtchk_param *par)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment