Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66816
b: refs/heads/master
c: fd8281a
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Oct 10, 2007
1 parent df0a3b0 commit bd93117
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3730578285fcf0c628f08b0dc89425cfeafd4ba
refs/heads/master: fd8281adacd2ed68a92e7aa9dde239181f40ee15
38 changes: 9 additions & 29 deletions trunk/net/netfilter/nfnetlink_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,29 +733,13 @@ static struct nf_logger nfulnl_logger = {
.me = THIS_MODULE,
};

static const int nfula_min[NFULA_MAX+1] = {
[NFULA_PACKET_HDR] = sizeof(struct nfulnl_msg_packet_hdr),
[NFULA_MARK] = sizeof(u_int32_t),
[NFULA_TIMESTAMP] = sizeof(struct nfulnl_msg_packet_timestamp),
[NFULA_IFINDEX_INDEV] = sizeof(u_int32_t),
[NFULA_IFINDEX_OUTDEV] = sizeof(u_int32_t),
[NFULA_IFINDEX_PHYSINDEV] = sizeof(u_int32_t),
[NFULA_IFINDEX_PHYSOUTDEV] = sizeof(u_int32_t),
[NFULA_HWADDR] = sizeof(struct nfulnl_msg_packet_hw),
[NFULA_PAYLOAD] = 0,
[NFULA_PREFIX] = 0,
[NFULA_UID] = sizeof(u_int32_t),
[NFULA_SEQ] = sizeof(u_int32_t),
[NFULA_SEQ_GLOBAL] = sizeof(u_int32_t),
};

static const int nfula_cfg_min[NFULA_CFG_MAX+1] = {
[NFULA_CFG_CMD] = sizeof(struct nfulnl_msg_config_cmd),
[NFULA_CFG_MODE] = sizeof(struct nfulnl_msg_config_mode),
[NFULA_CFG_TIMEOUT] = sizeof(u_int32_t),
[NFULA_CFG_QTHRESH] = sizeof(u_int32_t),
[NFULA_CFG_NLBUFSIZ] = sizeof(u_int32_t),
[NFULA_CFG_FLAGS] = sizeof(u_int16_t),
static const struct nla_policy nfula_cfg_policy[NFULA_CFG_MAX+1] = {
[NFULA_CFG_CMD] = { .len = sizeof(struct nfulnl_msg_config_cmd) },
[NFULA_CFG_MODE] = { .len = sizeof(struct nfulnl_msg_config_mode) },
[NFULA_CFG_TIMEOUT] = { .type = NLA_U32 },
[NFULA_CFG_QTHRESH] = { .type = NLA_U32 },
[NFULA_CFG_NLBUFSIZ] = { .type = NLA_U32 },
[NFULA_CFG_FLAGS] = { .type = NLA_U16 },
};

static int
Expand All @@ -769,11 +753,6 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,

UDEBUG("entering for msg %u\n", NFNL_MSG_TYPE(nlh->nlmsg_type));

if (nlattr_bad_size(nfula, NFULA_CFG_MAX, nfula_cfg_min)) {
UDEBUG("bad attribute size\n");
return -EINVAL;
}

inst = instance_lookup_get(group_num);
if (nfula[NFULA_CFG_CMD]) {
u_int8_t pf = nfmsg->nfgen_family;
Expand Down Expand Up @@ -886,7 +865,8 @@ static const struct nfnl_callback nfulnl_cb[NFULNL_MSG_MAX] = {
[NFULNL_MSG_PACKET] = { .call = nfulnl_recv_unsupp,
.attr_count = NFULA_MAX, },
[NFULNL_MSG_CONFIG] = { .call = nfulnl_recv_config,
.attr_count = NFULA_CFG_MAX, },
.attr_count = NFULA_CFG_MAX,
.policy = nfula_cfg_policy },
};

static const struct nfnetlink_subsystem nfulnl_subsys = {
Expand Down

0 comments on commit bd93117

Please sign in to comment.