From 69dd5ecea91e3e122dbd7f1544a3417ec1ad9bb1 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:33 +0200 Subject: [PATCH 01/14] htb: Declare rtnl_htb_set_level() Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- include/netlink/route/qdisc/htb.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/netlink/route/qdisc/htb.h b/include/netlink/route/qdisc/htb.h index c909f84..c5065f4 100644 --- a/include/netlink/route/qdisc/htb.h +++ b/include/netlink/route/qdisc/htb.h @@ -40,6 +40,7 @@ extern uint32_t rtnl_htb_get_cbuffer(struct rtnl_class *); extern int rtnl_htb_set_cbuffer(struct rtnl_class *, uint32_t); extern uint32_t rtnl_htb_get_quantum(struct rtnl_class *); extern int rtnl_htb_set_quantum(struct rtnl_class *, uint32_t); +extern int rtnl_htb_set_level(struct rtnl_class *, int); extern int rtnl_htb_get_level(struct rtnl_class *); #ifdef __cplusplus From a13010435ab91580283736f9054c12c8af17c5f6 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:32 +0200 Subject: [PATCH 02/14] link/ip6tnl: Declare rtnl_link_is_ip6_tnl() Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- include/netlink/route/link/ip6tnl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/netlink/route/link/ip6tnl.h b/include/netlink/route/link/ip6tnl.h index 7e0c295..4021356 100644 --- a/include/netlink/route/link/ip6tnl.h +++ b/include/netlink/route/link/ip6tnl.h @@ -22,6 +22,8 @@ extern "C" { extern struct rtnl_link *rtnl_link_ip6_tnl_alloc(void); extern int rtnl_link_ip6_tnl_add(struct nl_sock *sk, const char *name); + extern int rtnl_link_is_ip6_tnl(struct rtnl_link *link); + extern int rtnl_link_ip6_tnl_set_link(struct rtnl_link *link, uint32_t index); extern uint32_t rtnl_link_ip6_tnl_get_link(struct rtnl_link *link); From 2592a852fbeccfe723e98df31536bd2e4771227a Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:31 +0200 Subject: [PATCH 03/14] link/ip6tnl: Include Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/route/link/ip6tnl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/route/link/ip6tnl.c b/lib/route/link/ip6tnl.c index 9fe1367..26f3507 100644 --- a/lib/route/link/ip6tnl.c +++ b/lib/route/link/ip6tnl.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include From 180351cfd12fdd5d7941b173a87ef8b834283dd4 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:30 +0200 Subject: [PATCH 04/14] link/sit: Include Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/route/link/sit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/route/link/sit.c b/lib/route/link/sit.c index 694c177..0fc1ecd 100644 --- a/lib/route/link/sit.c +++ b/lib/route/link/sit.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include From a1273ce13cf05b113aaa464c5029cc46f754c1b8 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:29 +0200 Subject: [PATCH 05/14] link/ipgre: Include Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/route/link/ipgre.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/route/link/ipgre.c b/lib/route/link/ipgre.c index 74dbb9d..3927ab4 100644 --- a/lib/route/link/ipgre.c +++ b/lib/route/link/ipgre.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include From 73f999607d66856c64cf31c1ab4ee5178b3e8a6a Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:28 +0200 Subject: [PATCH 06/14] link/bonding: Include Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/route/link/bonding.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/route/link/bonding.c b/lib/route/link/bonding.c index f4c520b..11b6d3d 100644 --- a/lib/route/link/bonding.c +++ b/lib/route/link/bonding.c @@ -22,6 +22,7 @@ #include #include +#include #include /** From 821c189f77aae332e8b4eeb319b07635601e688c Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:27 +0200 Subject: [PATCH 07/14] link/inet: Include Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/route/link/inet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/route/link/inet.c b/lib/route/link/inet.c index 3bd76cc..0a7990e 100644 --- a/lib/route/link/inet.c +++ b/lib/route/link/inet.c @@ -61,6 +61,7 @@ #include #include #include +#include #include /** @cond SKIP */ From 9f848b3084082b20fdf4295aef238d99a159a50c Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:26 +0200 Subject: [PATCH 08/14] ematch/cmp: Include Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/route/cls/ematch/cmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/route/cls/ematch/cmp.c b/lib/route/cls/ematch/cmp.c index 2997cdb..2e380c3 100644 --- a/lib/route/cls/ematch/cmp.c +++ b/lib/route/cls/ematch/cmp.c @@ -20,6 +20,7 @@ #include #include #include +#include #include void rtnl_ematch_cmp_set(struct rtnl_ematch *e, struct tcf_em_cmp *cfg) From a1593c234a882c001e294b3c4d961c9379ca5e05 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:25 +0200 Subject: [PATCH 09/14] neightbl: Declare rtnl_neightbl_set_gc_interval() Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- include/netlink/route/neightbl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/netlink/route/neightbl.h b/include/netlink/route/neightbl.h index 412c3e9..6c6c9a5 100644 --- a/include/netlink/route/neightbl.h +++ b/include/netlink/route/neightbl.h @@ -41,6 +41,7 @@ extern void rtnl_neightbl_set_family(struct rtnl_neightbl *, int); extern void rtnl_neightbl_set_gc_tresh1(struct rtnl_neightbl *, int); extern void rtnl_neightbl_set_gc_tresh2(struct rtnl_neightbl *, int); extern void rtnl_neightbl_set_gc_tresh3(struct rtnl_neightbl *, int); +extern void rtnl_neightbl_set_gc_interval(struct rtnl_neightbl *, uint64_t); extern void rtnl_neightbl_set_name(struct rtnl_neightbl *, const char *); extern void rtnl_neightbl_set_dev(struct rtnl_neightbl *, int); extern void rtnl_neightbl_set_queue_len(struct rtnl_neightbl *, int); From 17f1c386df316a8b8193fd27f2d774f6ecac2871 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:24 +0200 Subject: [PATCH 10/14] act: Declare rtnl_act_change() Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- include/netlink/route/action.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/netlink/route/action.h b/include/netlink/route/action.h index 054bdd8..5db92ab 100644 --- a/include/netlink/route/action.h +++ b/include/netlink/route/action.h @@ -27,6 +27,7 @@ extern void rtnl_act_put(struct rtnl_act *); extern int rtnl_act_build_add_request(struct rtnl_act *, int, struct nl_msg **); extern int rtnl_act_add(struct nl_sock *, struct rtnl_act *, int); +extern int rtnl_act_change(struct nl_sock *, struct rtnl_act *, int); extern int rtnl_act_build_change_request(struct rtnl_act *, int, struct nl_msg **); From 70849054f70e8a2e739a41dcc2d6659ef15aa2e3 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:23 +0200 Subject: [PATCH 11/14] act: Include Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/route/act.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/route/act.c b/lib/route/act.c index 85ce445..7ec91ba 100644 --- a/lib/route/act.c +++ b/lib/route/act.c @@ -21,6 +21,7 @@ #include #include #include +#include static struct nl_object_ops act_obj_ops; From 779d1341f8c81d22144dffa03f4069292421259e Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:22 +0200 Subject: [PATCH 12/14] socket: Be correct, time(2) takes a pointer, not an integer Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/socket.c b/lib/socket.c index 5f61b38..3a41caa 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -190,7 +190,7 @@ static struct nl_sock *__alloc_socket(struct nl_cb *cb) sk->s_cb = nl_cb_get(cb); sk->s_local.nl_family = AF_NETLINK; sk->s_peer.nl_family = AF_NETLINK; - sk->s_seq_expect = sk->s_seq_next = time(0); + sk->s_seq_expect = sk->s_seq_next = time(NULL); /* the port is 0 (unspecified), meaning NL_OWN_PORT */ sk->s_flags = NL_OWN_PORT; From 99050f22486adfccfad628ab4a314dadbbcedae1 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:21 +0200 Subject: [PATCH 13/14] cache: Declare nl_cache_ops_set_flags() Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- include/netlink/cache.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/netlink/cache.h b/include/netlink/cache.h index e21aa1c..a2b3dbb 100644 --- a/include/netlink/cache.h +++ b/include/netlink/cache.h @@ -162,6 +162,8 @@ extern void nl_cache_mngr_free(struct nl_cache_mngr *); extern void nl_cache_ops_get(struct nl_cache_ops *); extern void nl_cache_ops_put(struct nl_cache_ops *); +extern void nl_cache_ops_set_flags(struct nl_cache_ops *, + unsigned int); #ifdef __cplusplus } From 5329f6a6c792fc444e90e928f3b0ccec303f201a Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 26 Jul 2014 21:33:20 +0200 Subject: [PATCH 14/14] cache_mngt: Make __nl_cache_ops_lookup() static, it was never declared Signed-off-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/cache_mngt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cache_mngt.c b/lib/cache_mngt.c index 4d3d6ff..9f8a742 100644 --- a/lib/cache_mngt.c +++ b/lib/cache_mngt.c @@ -38,7 +38,7 @@ static NL_RW_LOCK(cache_ops_lock); * @{ */ -struct nl_cache_ops *__nl_cache_ops_lookup(const char *name) +static struct nl_cache_ops *__nl_cache_ops_lookup(const char *name) { struct nl_cache_ops *ops;