bump version
[buildroot.git] / package / l2tp / l2tp-sanity.patch
blob1d0533d5d31747a5d0ced2b4cc8eba7480a80685
1 diff -rdup l2tpd-0.70-pre20031121.oorig/avp.c l2tpd-0.70-pre20031121/avp.c
2 --- l2tpd-0.70-pre20031121.oorig/avp.c 2006-12-28 16:00:26.000000000 +0100
3 +++ l2tpd-0.70-pre20031121/avp.c 2006-12-28 16:06:43.000000000 +0100
4 @@ -146,6 +146,7 @@ int validate_msgtype_avp(int attr, stru
5 u_int8_t *p = data + sizeof(struct avp_hdr);
6 c->msgtype = get16(p);
8 +#ifdef SANITY
9 if (t->sanity)
12 @@ -293,6 +294,7 @@ int validate_msgtype_avp(int attr, stru
13 return -EINVAL;
16 +#endif
17 return 0;
20 @@ -301,7 +303,7 @@ int validate_gen_avp(int attr, struct t
21 void *data, int datalen) {
22 (void)data; (void)datalen;
23 int i = 0, found = 0;
25 +#ifdef SANITY
26 if(t->sanity) {
27 for(i = 0; i < 8; i++) {
28 if(c->msgtype == avps[attr].allowed_states[i])
29 @@ -310,6 +312,7 @@ int validate_gen_avp(int attr, struct t
30 if(!found)
31 return -EINVAL;
33 +#endif
34 return 0;
37 diff -rdup l2tpd-0.70-pre20031121.oorig/l2tpd.c l2tpd-0.70-pre20031121/l2tpd.c
38 --- l2tpd-0.70-pre20031121.oorig/l2tpd.c 2006-12-28 16:00:26.000000000 +0100
39 +++ l2tpd-0.70-pre20031121/l2tpd.c 2006-12-28 16:04:15.000000000 +0100
40 @@ -748,7 +748,9 @@ struct tunnel *new_tunnel ()
41 tmp->peer.sin_family = AF_INET;
42 tmp->peer.sin_port = 0;
43 bzero (&(tmp->peer.sin_addr), sizeof (tmp->peer.sin_addr));
44 +#ifdef SANITY
45 tmp->sanity = -1;
46 +#endif
47 tmp->qtid = -1;
48 tmp->ourfc = ASYNC_FRAMING | SYNC_FRAMING;
49 tmp->ourbc = 0;