tools: hv: kvp_daemon: make IPv6-only-injection work
Dexuan Cui
maintainerPATCH v2 1/1 tools: hv: kvp_daemon: make IPv6-only-injection work
In the case the host only injects an IPv6 address, the dhcp_enabled flag is true (it's only for IPv4 according to Hyper-V host team), but we still need to proceed to parse the IPv6 information.
---
v2: removed the distro-specific logic as Vitaly suggested.
tools/hv/hv_kvp_daemon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
tools/hv/hv_kvp_daemon.c +6 -6
@@ -1308,16 +1308,17 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)if (error) goto setval_error; +/* +* The dhcp_enabled flag is only for IPv4. In the case the host only +* injects an IPv6 address, the flag is true, but we still need to +* proceed to parse and pass the IPv6 information to the +* disto-specific script hv_set_ifconfig. +*/ if (new_val->dhcp_enabled) { error =kvp_write_file (file,"BOOTPROTO" ,"" ,"dhcp" );if (error) goto setval_error; -/* -* We are done!. -*/ - goto setval_done; - }else { error =kvp_write_file (file,"BOOTPROTO" ,"" ,"none" );if (error)
@@ -1345,7 +1346,6 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)if (error) goto setval_error; -setval_done:fclose (file);/*
Signature · 1 line
1.9.1
Dexuan Cui
maintainerQuoted 60 lines
-----Original Message-----
From: devel [mailto:[email protected]] On Behalf Of Dexuan Cui
Sent: Wednesday, December 10, 2014 19:33 PM
To: [email protected]; [email protected]; driverdev- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; KY Srinivasan
Cc: Haiyang Zhang
Subject: [PATCH v2] tools: hv:kvp_daemon: make IPv6-only-injection workIn the case the host only injects an IPv6 address, the
dhcp_enabledflag is true (it's only for IPv4 according to Hyper-V host team), but we still need to proceed to parse the IPv6 information.Cc Vitaly Kuznetsov <[email protected]>Cc K. Y. Srinivasan <[email protected]>Signed-off-by Dexuan Cui <[email protected]>---
v2: removed the distro-specific logic as Vitaly suggested.
tools/hv/hv_kvp_daemon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)tools/hv/hv_kvp_daemon.c +6
-5@@ -1308,16 +1308,17 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)if (error) goto setval_error; +/* +* The dhcp_enabled flag is only for IPv4. In the case the host only +* injects an IPv6 address, the flag is true, but we still need to +* proceed to parse and pass the IPv6 information to the +* disto-specific script hv_set_ifconfig. +*/ if (new_val->dhcp_enabled) { error =kvp_write_file (file,"BOOTPROTO" ,"" ,"dhcp" );if (error) goto setval_error; -/* -* We are done!. -*/ - goto setval_done; - }else { error =kvp_write_file (file,"BOOTPROTO" ,"" ,"none" );tools/hv/hv_kvp_daemon.c +0
-1if (error)@@ -1345,7 +1346,6 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)if (error) goto setval_error; -setval_done:fclose (file);
Quoted 3 lines
/*
--
1.9.1
Hi Vitaly,
Can you please ACK the v2 patch?
Or, please let me know if you have new comments.
Thanks,
-- Dexuan
Vitaly Kuznetsov
Reviewed-byQuoted 33 lines · Dexuan Cui
Quoted 33 lines
-----Original Message-----
From: devel [mailto:[email protected]] On Behalf Of Dexuan Cui
Sent: Wednesday, December 10, 2014 19:33 PM
To: [email protected]; [email protected]; driverdev- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; KY Srinivasan
Cc: Haiyang Zhang
Subject: [PATCH v2] tools: hv:kvp_daemon: make IPv6-only-injection workIn the case the host only injects an IPv6 address, the
dhcp_enabledflag is true (it's only for IPv4 according to Hyper-V host team), but we still need to proceed to parse the IPv6 information.Cc Vitaly Kuznetsov <[email protected]>Cc K. Y. Srinivasan <[email protected]>Signed-off-by Dexuan Cui <[email protected]>---
v2: removed the distro-specific logic as Vitaly suggested.
tools/hv/hv_kvp_daemon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)tools/hv/hv_kvp_daemon.c +0
-0@@ -1308,16 +1308,17 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)if (error) goto setval_error;
Quoted 6 lines
tools/hv/hv_kvp_daemon.c static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val) · line 1316
Quoted 6 lines
tools/hv/hv_kvp_daemon.c +6
-0+/* +* The dhcp_enabled flag is only for IPv4. In the case the host only +* injects an IPv6 address, the flag is true, but we still need to +* proceed to parse and pass the IPv6 information to the +* disto-specific script hv_set_ifconfig. +*/
Actually we just relay what was recieved from the host and it's up to distro-specific script how to interpret BOOTPROTO=dhcp now. Additional IPv4 addresses (in case we receive them from our host) are not skipped now as well.
Quoted 21 lines
Quoted 21 lines
tools/hv/hv_kvp_daemon.c +0
-5if (new_val->dhcp_enabled) { error =kvp_write_file (file,"BOOTPROTO" ,"" ,"dhcp" );if (error) goto setval_error; -/* -* We are done!. -*/ - goto setval_done; - }else { error =kvp_write_file (file,"BOOTPROTO" ,"" ,"none" );tools/hv/hv_kvp_daemon.c +0
-1if (error)@@ -1345,7 +1346,6 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)if (error) goto setval_error; -setval_done:fclose (file);
Quoted 6 lines
Quoted 3 lines
/*
--
1.9.1Hi Vitaly,
Can you please ACK the v2 patch?
Sorry it took me so long to reply, last 3 weeks I was on vacation. I'm not particulary sure I'm in charge here to give an ACK :-), but
Quoted 4 lines
Or, please let me know if you have new comments.
Thanks,
-- Dexuan
Signature · 1 line
Vitaly
Dexuan Cui
maintainerQuoted 48 lines
-----Original Message-----
From: Vitaly Kuznetsov [mailto:[email protected]]
Sent: Friday, January 2, 2015 22:51 PM
To: Dexuan Cui
Cc: [email protected]; [email protected]; driverdev- [email protected]; [email protected]; [email protected]; [email protected]; KY Srinivasan; Haiyang Zhang
Subject: Re: [PATCH v2] tools: hv:kvp_daemon: make IPv6-only-injection workQuoted 5 lines · Dexuan Cui
Quoted 5 lines
-----Original Message-----
From: devel [mailto:[email protected]] On Behalf Of Dexuan Cui
Sent: Wednesday, December 10, 2014 19:33 PM
To: [email protected]; [email protected];driverdev-
Quoted 7 lines
Quoted 7 lines
[email protected]; [email protected]; [email protected]; [email protected]; [email protected]; KY Srinivasan
Cc: Haiyang Zhang
Subject: [PATCH v2] tools: hv:kvp_daemon: make IPv6-only-injection workIn the case the host only injects an IPv6 address, the
dhcp_enabledflag is true (it's only for IPv4 according to Hyper-V host team), but we still needto
Quoted 9 lines
Quoted 9 lines
proceed to parse the IPv6 information.
Cc Vitaly Kuznetsov <[email protected]>Cc K. Y. Srinivasan <[email protected]>Signed-off-by Dexuan Cui <[email protected]>---
v2: removed the distro-specific logic as Vitaly suggested.
Quoted 8 lines
tools/hv/hv_kvp_daemon.c static int kvp_set_ip_info(char *if_name,
Quoted 8 lines
tools/hv/hv_kvp_daemon.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)tools/hv/hv_kvp_daemon.c +0
-0@@ -1308,16 +1308,17 @@ static int kvp_set_ip_info(char *if_name,struct
Quoted 4 lines
Quoted 4 lines
tools/hv/hv_kvp_daemon.c +0
-0hv_kvp_ipaddr_value *new_val)if (error) goto setval_error;
Quoted 11 lines
Quoted 6 lines
tools/hv/hv_kvp_daemon.c static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val) · line 1316
Quoted 6 lines
tools/hv/hv_kvp_daemon.c +6
-0+/* +* The dhcp_enabled flag is only for IPv4. In the case the host only +* injects an IPv6 address, the flag is true, but we still need to +* proceed to parse and pass the IPv6 information to the +* disto-specific script hv_set_ifconfig. +*/ Actually we just relay what was recieved from the host and it's up to distro-specific script how to interpret BOOTPROTO=dhcp now. Additional IPv4 addresses (in case we receive them from our host) are not skipped now as well.
Yes.
Quoted 29 lines
Quoted 22 lines
Quoted 22 lines
tools/hv/hv_kvp_daemon.c +0
-5if (new_val->dhcp_enabled) { error =kvp_write_file (file,"BOOTPROTO" ,"" ,"dhcp" );if (error) goto setval_error; -/* -* We are done!. -*/ - goto setval_done; - }else { error =kvp_write_file (file,"BOOTPROTO" ,"" ,"none" );tools/hv/hv_kvp_daemon.c +0
-1if (error)@@ -1345,7 +1346,6 @@ static int kvp_set_ip_info(char *if_name, struct hv_kvp_ipaddr_value *new_val)if (error) goto setval_error; -setval_done:fclose (file);Quoted 6 lines
Quoted 3 lines
/*
--
1.9.1Hi Vitaly,
Can you please ACK the v2 patch?
Quoted 2 lines
Sorry it took me so long to reply, last 3 weeks I was on vacation. I'm not particulary sure I'm in charge here to give an ACK :-), but
It's OK. :-)
Thanks, Vitaly!
Quoted 5 lines
Reviewed-by Vitaly Kuznetsov <[email protected]>Quoted 2 lines
Or, please let me know if you have new comments.
Greg, may I have your comment, or do you need me to resend the patch since it was last sent 3+ weeks ago?
Thanks,
-- Dexuan