mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 10:16:41 +00:00
sk-inet: Added IP_TTL socket option
Signed-off-by: rahulk789 <rahul.u.india@gmail.com>
This commit is contained in:
parent
9d9ae2954d
commit
66cab1f49e
2 changed files with 7 additions and 1 deletions
|
|
@ -417,10 +417,12 @@ static int dump_ip_opts(int sk, int family, int type, int proto, IpOptsEntry *io
|
|||
ret |= dump_opt(sk, SOL_IP, IP_FREEBIND, &ioe->freebind);
|
||||
ret |= dump_opt(sk, SOL_IP, IP_PKTINFO, &ioe->pktinfo);
|
||||
ret |= dump_opt(sk, SOL_IP, IP_TOS, &ioe->tos);
|
||||
ret |= dump_opt(sk, SOL_IP, IP_TTL, &ioe->ttl);
|
||||
}
|
||||
ioe->has_freebind = ioe->freebind;
|
||||
ioe->has_pktinfo = !!ioe->pktinfo;
|
||||
ioe->has_tos = !!ioe->tos;
|
||||
ioe->has_ttl = !!ioe->ttl;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -817,7 +819,10 @@ int restore_ip_opts(int sk, int family, int proto, IpOptsEntry *ioe)
|
|||
ret |= restore_opt(sk, SOL_IP, IP_PKTINFO, &ioe->pktinfo);
|
||||
if (ioe->has_tos)
|
||||
ret |= restore_opt(sk, SOL_IP, IP_TOS, &ioe->tos);
|
||||
}
|
||||
if (ioe->has_ttl)
|
||||
ret |= restore_opt(sk, SOL_IP, IP_TTL, &ioe->ttl);
|
||||
|
||||
}
|
||||
|
||||
if (ioe->raw)
|
||||
ret |= restore_ip_raw_opts(sk, family, proto, ioe->raw);
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ message ip_opts_entry {
|
|||
|
||||
optional bool pktinfo = 5;
|
||||
optional uint32 tos = 6;
|
||||
optional uint32 ttl = 7;
|
||||
}
|
||||
|
||||
message inet_sk_entry {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue