Skip to contentSkip to conversation

STATE: Add Mobile IPv6 route optimization protocols to netlink interface.

PATCH In review Masahide NAKAMURA 1 participant 1 message Jul 29, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 15/20 STATE: Add Mobile IPv6 route optimization protocols to netlink interface.

Add Mobile IPv6 route optimization protocols to netlink interface. Route optimization states carry care-of address.
Based on MIPL2 kernel patch.

---
 net/xfrm/xfrm_user.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
net/xfrm/xfrm_user.c +22 -0
index cf62208..e45d25f 100644
@@ -27,6 +27,9 @@ #include <net/sock.h>
 #include <net/xfrm.h>
 #include <net/netlink.h>
 #include <asm/uaccess.h>
+#ifdef CONFIG_IPV6_MIP6
+#include <linux/in6.h>
+#endif
 
 static int verify_one_alg(struct rtattr **xfrma, enum xfrm_attr_type_t type)
 {
@@ -171,7 +174,26 @@ #endif
 			goto out;
 		break;
 
+#ifdef CONFIG_IPV6_MIP6
+	case IPPROTO_DSTOPTS:
+	case IPPROTO_ROUTING:
+#ifdef CONFIG_XFRM_ADVANCED
+		if (xfrma[XFRMA_ALG_COMP-1]	||
+		    xfrma[XFRMA_ALG_AUTH-1]	||
+		    xfrma[XFRMA_ALG_CRYPT-1]	||
+		    xfrma[XFRMA_ENCAP-1]	||
+		    xfrma[XFRMA_SEC_CTX - 1]	||
+		    !xfrma[XFRMA_ADDR-1])
+			goto out;
+		break;
+#else
+		err = -ENOSYS;
+		goto out;
+#endif
+#endif
+
 	default:
+		err = -EPROTONOSUPPORT;
 		goto out;
 	};
 
Signature · 1 line
1.4.1