All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-cloud-services][PATCH] dhcp: Add the default route option
@ 2019-03-22  2:47 Zhixiong Chi
  2019-03-25  3:15 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Zhixiong Chi @ 2019-03-22  2:47 UTC (permalink / raw)
  To: yocto

Add the default route option for the operation of adding route,
while we set the static route and the mask setting is 0.

For example:
add_routes 32 169 254 169 254 10 209 67 4 0 10 209 67 1

The first route (169.254.169.254/32 via 10.209.67.4) is added successfully,
but the second route (10.209.67.1, default) is not added at all.

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
---
 recipes-connectivity/dhcp/files/dhclient-exit-hooks | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/recipes-connectivity/dhcp/files/dhclient-exit-hooks b/recipes-connectivity/dhcp/files/dhclient-exit-hooks
index 3be5e02..41bcb08 100644
--- a/recipes-connectivity/dhcp/files/dhclient-exit-hooks
+++ b/recipes-connectivity/dhcp/files/dhclient-exit-hooks
@@ -66,6 +66,9 @@ while [ $# -ne 0 ]; do
   elif [ $mask -gt 8 ]; then
     destination="-net $1.$2.0.0/$mask"
     shift; shift
+  #Add the default route
+  elif [ $mask -eq 0 ]; then
+    destination="default"
   else
     destination="-net $1.0.0.0/$mask"
     shift
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-cloud-services][PATCH] dhcp: Add the default route option
  2019-03-22  2:47 [meta-cloud-services][PATCH] dhcp: Add the default route option Zhixiong Chi
@ 2019-03-25  3:15 ` Bruce Ashfield
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2019-03-25  3:15 UTC (permalink / raw)
  To: Zhixiong Chi; +Cc: Yocto Project Discussion

merged

Bruce

On Thu, Mar 21, 2019 at 10:52 PM Zhixiong Chi
<zhixiong.chi@windriver.com> wrote:
>
> Add the default route option for the operation of adding route,
> while we set the static route and the mask setting is 0.
>
> For example:
> add_routes 32 169 254 169 254 10 209 67 4 0 10 209 67 1
>
> The first route (169.254.169.254/32 via 10.209.67.4) is added successfully,
> but the second route (10.209.67.1, default) is not added at all.
>
> Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
> ---
>  recipes-connectivity/dhcp/files/dhclient-exit-hooks | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/recipes-connectivity/dhcp/files/dhclient-exit-hooks b/recipes-connectivity/dhcp/files/dhclient-exit-hooks
> index 3be5e02..41bcb08 100644
> --- a/recipes-connectivity/dhcp/files/dhclient-exit-hooks
> +++ b/recipes-connectivity/dhcp/files/dhclient-exit-hooks
> @@ -66,6 +66,9 @@ while [ $# -ne 0 ]; do
>    elif [ $mask -gt 8 ]; then
>      destination="-net $1.$2.0.0/$mask"
>      shift; shift
> +  #Add the default route
> +  elif [ $mask -eq 0 ]; then
> +    destination="default"
>    else
>      destination="-net $1.0.0.0/$mask"
>      shift
> --
> 2.17.1
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-25  3:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22  2:47 [meta-cloud-services][PATCH] dhcp: Add the default route option Zhixiong Chi
2019-03-25  3:15 ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.