diff options
author | Thomas Graf <tgr@lsx.localdomain> | 2008-05-15 12:01:57 (GMT) |
---|---|---|
committer | Thomas Graf <tgr@lsx.localdomain> | 2008-05-15 12:01:57 (GMT) |
commit | 28233246cd8fad47613e7ffd85ea0b1d69c0f8c2 (patch) | |
tree | cb0da1bd9fa56ad81dd7fae0e4120840d54230df /lib | |
parent | 8cd39c9f4ca8731279ea6467a9d489902fcae7f9 (diff) | |
download | libnl-28233246cd8fad47613e7ffd85ea0b1d69c0f8c2.zip libnl-28233246cd8fad47613e7ffd85ea0b1d69c0f8c2.tar.gz libnl-28233246cd8fad47613e7ffd85ea0b1d69c0f8c2.tar.bz2 |
Allow parser callbacks to return NL_OK, NL_SKIP, NL_EXIT
Obsoletes internal P_ACCEPT/P_IGNORE
Diffstat (limited to 'lib')
-rw-r--r-- | lib/genl/ctrl.c | 5 | ||||
-rw-r--r-- | lib/netfilter/ct.c | 5 | ||||
-rw-r--r-- | lib/netfilter/log_msg.c | 5 | ||||
-rw-r--r-- | lib/netfilter/queue_msg.c | 5 | ||||
-rw-r--r-- | lib/route/addr.c | 5 | ||||
-rw-r--r-- | lib/route/class.c | 5 | ||||
-rw-r--r-- | lib/route/classifier.c | 5 | ||||
-rw-r--r-- | lib/route/link.c | 5 | ||||
-rw-r--r-- | lib/route/neigh.c | 5 | ||||
-rw-r--r-- | lib/route/neightbl.c | 4 | ||||
-rw-r--r-- | lib/route/qdisc.c | 5 | ||||
-rw-r--r-- | lib/route/route.c | 6 | ||||
-rw-r--r-- | lib/route/rule.c | 5 |
13 files changed, 1 insertions, 64 deletions
diff --git a/lib/genl/ctrl.c b/lib/genl/ctrl.c index f60cd1a..1301642 100644 --- a/lib/genl/ctrl.c +++ b/lib/genl/ctrl.c @@ -128,11 +128,6 @@ static int ctrl_msg_parser(struct nl_cache_ops *ops, struct genl_cmd *cmd, } err = pp->pp_cb((struct nl_object *) family, pp); - if (err < 0) - goto errout; - - err = P_ACCEPT; - errout: genl_family_put(family); return err; diff --git a/lib/netfilter/ct.c b/lib/netfilter/ct.c index beb1dc5..2f111d6 100644 --- a/lib/netfilter/ct.c +++ b/lib/netfilter/ct.c @@ -364,11 +364,6 @@ static int ct_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, goto errout; err = pp->pp_cb((struct nl_object *) ct, pp); - if (err < 0) - goto errout; - - err = P_ACCEPT; - errout: nfnl_ct_put(ct); return err; diff --git a/lib/netfilter/log_msg.c b/lib/netfilter/log_msg.c index 33de482..cad6ddd 100644 --- a/lib/netfilter/log_msg.c +++ b/lib/netfilter/log_msg.c @@ -176,11 +176,6 @@ static int log_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, goto errout; err = pp->pp_cb((struct nl_object *) msg, pp); - if (err < 0) - goto errout; - - err = P_ACCEPT; - errout: nfnl_log_msg_put(msg); return err; diff --git a/lib/netfilter/queue_msg.c b/lib/netfilter/queue_msg.c index ec461a5..68f25f2 100644 --- a/lib/netfilter/queue_msg.c +++ b/lib/netfilter/queue_msg.c @@ -154,11 +154,6 @@ static int queue_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, goto errout; err = pp->pp_cb((struct nl_object *) msg, pp); - if (err < 0) - goto errout; - - err = P_ACCEPT; - errout: nfnl_queue_msg_put(msg); return err; diff --git a/lib/route/addr.c b/lib/route/addr.c index 3e86bde..999da7a 100644 --- a/lib/route/addr.c +++ b/lib/route/addr.c @@ -282,11 +282,6 @@ static int addr_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, } err = pp->pp_cb((struct nl_object *) addr, pp); - if (err < 0) - goto errout; - - err = P_ACCEPT; - errout: rtnl_addr_put(addr); diff --git a/lib/route/class.c b/lib/route/class.c index 20b59ee..1110565 100644 --- a/lib/route/class.c +++ b/lib/route/class.c @@ -53,11 +53,6 @@ static int class_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, } err = pp->pp_cb((struct nl_object *) class, pp); - if (err < 0) - goto errout_free; - - err = P_ACCEPT; - errout_free: rtnl_class_put(class); errout: diff --git a/lib/route/classifier.c b/lib/route/classifier.c index 9a2a9ac..4b5ce9d 100644 --- a/lib/route/classifier.c +++ b/lib/route/classifier.c @@ -64,11 +64,6 @@ static int cls_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, } err = pp->pp_cb((struct nl_object *) cls, pp); - if (err < 0) - goto errout_free; - - err = P_ACCEPT; - errout_free: rtnl_cls_put(cls); errout: diff --git a/lib/route/link.c b/lib/route/link.c index b894cab..b889d65 100644 --- a/lib/route/link.c +++ b/lib/route/link.c @@ -417,11 +417,6 @@ static int link_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, } err = pp->pp_cb((struct nl_object *) link, pp); - if (err < 0) - goto errout; - - err = P_ACCEPT; - errout: rtnl_link_put(link); return err; diff --git a/lib/route/neigh.c b/lib/route/neigh.c index 9541f20..bec98cc 100644 --- a/lib/route/neigh.c +++ b/lib/route/neigh.c @@ -317,11 +317,6 @@ static int neigh_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, } err = pp->pp_cb((struct nl_object *) neigh, pp); - if (err < 0) - goto errout; - - err = P_ACCEPT; - errout: rtnl_neigh_put(neigh); return err; diff --git a/lib/route/neightbl.c b/lib/route/neightbl.c index d34205a..d6495be 100644 --- a/lib/route/neightbl.c +++ b/lib/route/neightbl.c @@ -217,10 +217,6 @@ static int neightbl_msg_parser(struct nl_cache_ops *ops, } err = pp->pp_cb((struct nl_object *) ntbl, pp); - if (err < 0) - goto errout; - - err = P_ACCEPT; errout: rtnl_neightbl_put(ntbl); return err; diff --git a/lib/route/qdisc.c b/lib/route/qdisc.c index c8dd4d5..fe5a597 100644 --- a/lib/route/qdisc.c +++ b/lib/route/qdisc.c @@ -122,11 +122,6 @@ static int qdisc_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, } err = pp->pp_cb((struct nl_object *) qdisc, pp); - if (err < 0) - goto errout_free; - - err = P_ACCEPT; - errout_free: rtnl_qdisc_put(qdisc); errout: diff --git a/lib/route/route.c b/lib/route/route.c index 1c13e6e..613440f 100644 --- a/lib/route/route.c +++ b/lib/route/route.c @@ -36,12 +36,8 @@ static int route_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, if ((err = rtnl_route_parse(nlh, &route)) < 0) return err; - if ((err = pp->pp_cb((struct nl_object *) route, pp)) < 0) - goto errout; + err = pp->pp_cb((struct nl_object *) route, pp); - err = P_ACCEPT; - -errout: rtnl_route_put(route); return err; } diff --git a/lib/route/rule.c b/lib/route/rule.c index 00163b0..12a0d05 100644 --- a/lib/route/rule.c +++ b/lib/route/rule.c @@ -155,11 +155,6 @@ static int rule_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, } err = pp->pp_cb((struct nl_object *) rule, pp); - if (err < 0) - goto errout; - - err = P_ACCEPT; - errout: rtnl_rule_put(rule); return err; |