mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-23 02:01:55 +00:00
Socktest: Fix setting of TTL value
This commit is contained in:
parent
6dc69a00f7
commit
2bd35b0609
@ -58,8 +58,6 @@ skt_open(sock *s)
|
|||||||
sk_join_group(s, s->daddr); /* reception */
|
sk_join_group(s, s->daddr); /* reception */
|
||||||
}
|
}
|
||||||
|
|
||||||
sk_set_ttl(s, cf_ttl);
|
|
||||||
|
|
||||||
if (cf_bcast)
|
if (cf_bcast)
|
||||||
sk_setup_broadcast(s);
|
sk_setup_broadcast(s);
|
||||||
}
|
}
|
||||||
@ -74,7 +72,6 @@ skt_parse_args(int argc, char *argv[], int is_send)
|
|||||||
/* Set defaults */
|
/* Set defaults */
|
||||||
uint port = PKT_PORT;
|
uint port = PKT_PORT;
|
||||||
cf_value = PKT_VALUE;
|
cf_value = PKT_VALUE;
|
||||||
cf_ttl = 1;
|
|
||||||
cf_mcast = cf_bcast = cf_bind = cf_count = counter = 0;
|
cf_mcast = cf_bcast = cf_bind = cf_count = counter = 0;
|
||||||
|
|
||||||
/* Create socket */
|
/* Create socket */
|
||||||
@ -124,7 +121,7 @@ skt_parse_args(int argc, char *argv[], int is_send)
|
|||||||
cf_value = parse_uint(optarg);
|
cf_value = parse_uint(optarg);
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
cf_ttl = parse_uint(optarg);
|
s->ttl = parse_uint(optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -50,7 +50,6 @@ int cf_bind; /* Bind by address */
|
|||||||
uint cf_count; /* How many packets send */
|
uint cf_count; /* How many packets send */
|
||||||
uint counter; /* global counter of send/recv packets */
|
uint counter; /* global counter of send/recv packets */
|
||||||
uint cf_value; /* a value in packet */
|
uint cf_value; /* a value in packet */
|
||||||
uint cf_ttl;
|
|
||||||
|
|
||||||
sock *skt_parse_args(int argc, char **argv, int is_send);
|
sock *skt_parse_args(int argc, char **argv, int is_send);
|
||||||
void bird_init(void);
|
void bird_init(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user