diff options
author | Zhixiong Chi <zhixiong.chi@windriver.com> | 2019-03-21 19:47:56 -0700 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-03-24 23:14:23 -0400 |
commit | 5e5c80ec5c4ee05ab3b75e5ba5f00edbeedc1a6f (patch) | |
tree | 5c35e4abcabf7311ea6dd692bf4f57f532d09221 /recipes-connectivity | |
parent | f8899103d0c1f7b013ae3b06ead666f4e56660ef (diff) | |
download | meta-cloud-services-5e5c80ec5c4ee05ab3b75e5ba5f00edbeedc1a6f.tar.gz |
dhcp: Add the default route option
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>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-connectivity')
-rw-r--r-- | recipes-connectivity/dhcp/files/dhclient-exit-hooks | 3 |
1 files changed, 3 insertions, 0 deletions
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 | |||
66 | elif [ $mask -gt 8 ]; then | 66 | elif [ $mask -gt 8 ]; then |
67 | destination="-net $1.$2.0.0/$mask" | 67 | destination="-net $1.$2.0.0/$mask" |
68 | shift; shift | 68 | shift; shift |
69 | #Add the default route | ||
70 | elif [ $mask -eq 0 ]; then | ||
71 | destination="default" | ||
69 | else | 72 | else |
70 | destination="-net $1.0.0.0/$mask" | 73 | destination="-net $1.0.0.0/$mask" |
71 | shift | 74 | shift |