lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1433361502-3478761-5-git-send-email-tom@herbertland.com>
Date:	Wed, 3 Jun 2015 12:58:20 -0700
From:	Tom Herbert <tom@...bertland.com>
To:	<davem@...emloft.net>, <agartrell@...com>, <maheshb@...gle.com>,
	<tgraf@...g.ch>, <netdev@...r.kernel.org>
Subject: [RFC net-next 4/6] net: ILA use special route hook

Register hooks from ILA.

Signed-off-by: Tom Herbert <tom@...bertland.com>
---
 net/ipv6/ila.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/net/ipv6/ila.c b/net/ipv6/ila.c
index 54a215d..d6fce77 100644
--- a/net/ipv6/ila.c
+++ b/net/ipv6/ila.c
@@ -11,11 +11,16 @@
 #include <net/genetlink.h>
 #include <net/ila.h>
 #include <net/ip.h>
+#include <net/ip6_route.h>
 #include <net/netns/generic.h>
 #include <net/protocol.h>
 #include <uapi/linux/genetlink.h>
 #include <uapi/linux/ila.h>
 
+static bool special_route;
+module_param(special_route, bool, 0644);
+MODULE_PARM_DESC(special_route, "Set up special route hook");
+
 struct ila_map {
 	u64	identifier;
 	u64	locator;
@@ -370,12 +375,19 @@ static struct pernet_operations ila_net_ops = {
 	.size = sizeof(struct ila_net),
 };
 
+struct special_route ila_route_special = {
+	.input = ila_xlat_incoming,
+	.output = ila_xlat_outgoing,
+};
+
 static int __init ila_init(void)
 {
 	int ret;
 
 	ila_init_secret();
 
+	ip6_route_special_add(&ila_route_special);
+
 	ret = register_pernet_device(&ila_net_ops);
 	if (ret)
 		goto exit;
@@ -444,6 +456,7 @@ static void nat_locator(struct sk_buff *skb, struct ipv6hdr *ip6h, u64 locator)
 
 static void __exit ila_fini(void)
 {
+	ip6_route_special_remove(&ila_route_special);
 	genl_unregister_family(&ila_nl_family);
 	unregister_pernet_device(&ila_net_ops);
 }
-- 
1.8.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ