diff --git a/criu/sk-inet.c b/criu/sk-inet.c index a6a767c73f..f323cde9fe 100644 --- a/criu/sk-inet.c +++ b/criu/sk-inet.c @@ -413,16 +413,19 @@ static int dump_ip_opts(int sk, int family, int type, int proto, IpOptsEntry *io /* Due to kernel code we can use SOL_IP instead of SOL_IPV6 */ ret |= dump_opt(sk, SOL_IP, IP_FREEBIND, &ioe->freebind); ret |= dump_opt(sk, SOL_IPV6, IPV6_RECVPKTINFO, &ioe->pktinfo); + ret |= dump_opt(sk, SOL_IPV6, IPV6_TRANSPARENT, &ioe->transparent); } else { 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); + ret |= dump_opt(sk, SOL_IP, IP_TRANSPARENT, &ioe->transparent); } ioe->has_freebind = ioe->freebind; ioe->has_pktinfo = !!ioe->pktinfo; ioe->has_tos = !!ioe->tos; ioe->has_ttl = !!ioe->ttl; + ioe->has_transparent = !!ioe->transparent; return ret; } @@ -812,6 +815,8 @@ int restore_ip_opts(int sk, int family, int proto, IpOptsEntry *ioe) ret |= restore_opt(sk, SOL_IPV6, IPV6_FREEBIND, &ioe->freebind); if (ioe->has_pktinfo) ret |= restore_opt(sk, SOL_IPV6, IPV6_RECVPKTINFO, &ioe->pktinfo); + if (ioe->has_transparent) + ret |= restore_opt(sk, SOL_IPV6, IPV6_TRANSPARENT, &ioe->transparent); } else { if (ioe->has_freebind) ret |= restore_opt(sk, SOL_IP, IP_FREEBIND, &ioe->freebind); @@ -821,6 +826,8 @@ int restore_ip_opts(int sk, int family, int proto, IpOptsEntry *ioe) 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->has_transparent) + ret |= restore_opt(sk, SOL_IP, IP_TRANSPARENT, &ioe->transparent); } if (ioe->raw) diff --git a/images/sk-inet.proto b/images/sk-inet.proto index 03a679e7fa..a21992cd0e 100644 --- a/images/sk-inet.proto +++ b/images/sk-inet.proto @@ -21,6 +21,7 @@ message ip_opts_entry { optional bool pktinfo = 5; optional uint32 tos = 6; optional uint32 ttl = 7; + optional bool transparent = 8; } message inet_sk_entry { diff --git a/test/zdtm/static/sock_ip_opts00.c b/test/zdtm/static/sock_ip_opts00.c index cb464365d9..d38822bcac 100644 --- a/test/zdtm/static/sock_ip_opts00.c +++ b/test/zdtm/static/sock_ip_opts00.c @@ -28,6 +28,7 @@ struct sk_opt sk_opts_v4[] = { { SOL_IP, IP_PKTINFO, IP_OPT_VAL }, { SOL_IP, IP_TTL, 32 }, { SOL_IP, IP_TOS, IPTOS_TOS(IPTOS_THROUGHPUT) }, + { SOL_IP, IP_TRANSPARENT, IP_OPT_VAL }, }; #ifndef IPV6_FREEBIND @@ -37,6 +38,7 @@ struct sk_opt sk_opts_v4[] = { struct sk_opt sk_opts_v6[] = { { SOL_IPV6, IPV6_FREEBIND, IP_OPT_VAL }, { SOL_IPV6, IPV6_RECVPKTINFO, IP_OPT_VAL }, + { SOL_IPV6, IPV6_TRANSPARENT, IP_OPT_VAL }, }; struct sk_conf {