projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Log the session # when adding IPv6 routes.
[l2tpns.git]
/
l2tpns.c
diff --git
a/l2tpns.c
b/l2tpns.c
index
ae7f3f4
..
dca810f
100644
(file)
--- a/
l2tpns.c
+++ b/
l2tpns.c
@@
-456,7
+456,7
@@
static void routeset(sessionidt s, in_addr_t ip, int prefixlen, in_addr_t gw, in
req.rt.rtm_family = AF_INET;
req.rt.rtm_dst_len = prefixlen;
req.rt.rtm_table = RT_TABLE_MAIN;
req.rt.rtm_family = AF_INET;
req.rt.rtm_dst_len = prefixlen;
req.rt.rtm_table = RT_TABLE_MAIN;
- req.rt.rtm_protocol =
RTPROT_BOOT; // XXX
+ req.rt.rtm_protocol =
42;
req.rt.rtm_scope = RT_SCOPE_LINK;
req.rt.rtm_type = RTN_UNICAST;
req.rt.rtm_scope = RT_SCOPE_LINK;
req.rt.rtm_type = RTN_UNICAST;
@@
-535,7
+535,7
@@
void route6set(sessionidt s, struct in6_addr ip, int prefixlen, int add)
req.rt.rtm_family = AF_INET6;
req.rt.rtm_dst_len = prefixlen;
req.rt.rtm_table = RT_TABLE_MAIN;
req.rt.rtm_family = AF_INET6;
req.rt.rtm_dst_len = prefixlen;
req.rt.rtm_table = RT_TABLE_MAIN;
- req.rt.rtm_protocol =
RTPROT_BOOT; // XXX
+ req.rt.rtm_protocol =
42;
req.rt.rtm_scope = RT_SCOPE_LINK;
req.rt.rtm_type = RTN_UNICAST;
req.rt.rtm_scope = RT_SCOPE_LINK;
req.rt.rtm_type = RTN_UNICAST;
@@
-544,7
+544,7
@@
void route6set(sessionidt s, struct in6_addr ip, int prefixlen, int add)
metric = 1;
netlink_addattr(&req.nh, RTA_METRICS, &metric, sizeof(metric));
metric = 1;
netlink_addattr(&req.nh, RTA_METRICS, &metric, sizeof(metric));
- LOG(1,
0
, 0, "Route %s %s/%d\n",
+ LOG(1,
s
, 0, "Route %s %s/%d\n",
add ? "add" : "del",
inet_ntop(AF_INET6, &ip, ipv6addr, INET6_ADDRSTRLEN),
prefixlen);
add ? "add" : "del",
inet_ntop(AF_INET6, &ip, ipv6addr, INET6_ADDRSTRLEN),
prefixlen);
@@
-2959,7
+2959,7
@@
void processudp(uint8_t *buf, int len, struct sockaddr_in *addr)
// Set multilink options before sending initial LCP packet
sess_local[s].mp_mrru = 1614;
// Set multilink options before sending initial LCP packet
sess_local[s].mp_mrru = 1614;
- sess_local[s].mp_epdis =
config->bind_address ? config->bind_address : my_address
;
+ sess_local[s].mp_epdis =
ntohl(config->bind_address ? config->bind_address : my_address)
;
sendlcp(s, t);
change_state(s, lcp, RequestSent);
sendlcp(s, t);
change_state(s, lcp, RequestSent);