[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 03025) Problem with ip6_route_add()
- To: <usagi-users@xxxxxxxxxxxxxx>
- Subject: (usagi-users 03025) Problem with ip6_route_add()
- From: "LUGH" <lugh@xxxxxxxxxx>
- Date: Mon, 6 Sep 2004 16:07:44 -0400
- Reply-to: usagi-users@xxxxxxxxxxxxxx
Hi,
I'm trying to configure a host based route in my module.
I'm modifying an old version of the MIPL module; I imitated
some code I saw elsewhere (add_prefix_route). However,
after this portion of my module runs, when I type "ip -6
route" the route is not there!
Can someone take a look and see if there are any obvious
errors? I've debugged the module and I know that it executes
this code. In the mean time I guess I'll try printk
statements to try and determine which part of ip6_route_add
doesn't like my rtmsg structure.
Any packets bound for ptr->mn should go out the interface
that has the address ptr->fa.
-------------------------------------
static __inline__ void local_add_mn_route(struct fa_entry *ptr) {
struct in6_rtmsg rtmsg;
struct inet6_ifaddr *addr;
addr = ipv6_get_ifaddr( &(ptr->fa), NULL);
memset(&rtmsg, 0, sizeof(struct rtmsg));
ipv6_addr_copy(&rtmsg.rtmsg_dst, &(ptr->mn));
rtmsg.rtmsg_des_len = 128;
ipv6_addr_copy(&rtmsg.rtmsg_src, &(prt->fa) );
rtmsg.rtmsg_src_len = 128;
rtmsg.rtmsg_metric = IP6_RT_PRIO_MIPV6;
rtmsg.rtmsg_ifindex = addr->idev->dev->ifindex;
rtmsg.rtmsg_info = 0xffffffff;
rtmsg.rtmsg_flags = RTF_UP | RTF_EXPIRES;
rtmsg.rtmsg_type = RTMSG_NEWROUTE;
ip6_route_add(&rtmsg);
}
Thanx,
Bryan