Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadUmarAsad committed Feb 18, 2023
2 parents 6ea6025 + 33e85d3 commit a007d20
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 143 deletions.
2 changes: 1 addition & 1 deletion config/vlan.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def add_vlan(db, vid, multiple):
click.echo("Vlan{} has been added".format(vid))

# set dhcpv6_relay table
set_dhcp_relay_table('DHCP_RELAY', config_db, vlan, {'vlanid': str(vid)})
set_dhcp_relay_table('DHCP_RELAY', config_db, vlan, None)
# We need to restart dhcp_relay service after dhcpv6_relay config change
dhcp_relay_util.handle_restart_dhcp_relay_service()

Expand Down
93 changes: 93 additions & 0 deletions doc/Command-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
* [Console connect commands](#console-connect-commands)
* [Console clear commands](#console-clear-commands)
* [DHCP Relay](#dhcp-relay)
* [DHCP Relay show commands](#dhcp-relay-show-commands)
* [DHCP Relay clear commands](#dhcp-relay-clear-commands)
* [DHCP Relay config commands](#dhcp-relay-config-commands)
* [Drop Counters](#drop-counters)
* [Drop Counter show commands](#drop-counters-show-commands)
Expand Down Expand Up @@ -2408,6 +2410,97 @@ Go Back To [Beginning of the document](#) or [Beginning of this section](#consol

## DHCP Relay

### DHCP Relay show commands

This sub-section of commands is used to show the DHCP Relay IP address(es) in a VLAN interface and show dhcpv6_relay counter of a VLAN.

**show dhcp_relay ipv4 helper**

This command is used to show ipv4 dhcp_relay helper.

- Usage:
```
show dhcp_relay ipv4 helper
```

- Example:
```
admin@sonic:~$ show dhcp_relay ipv4 helper
-------- ---------
Vlan1000 192.0.0.1
192.0.0.2
-------- ---------
```

**show dhcp_relay ipv6 destination**

This command is used to show ipv6 dhcp_relay destination.

- Usage:
```
show dhcp_relay ipv6 destination
```

- Example:
```
admin@sonic:~$ show dhcp_relay ipv6 destination
--------  ------------
Vlan1000  fc02:2000::1
          fc02:2000::2
          fc02:2000::3
          fc02:2000::4
--------  ------------
```

**show dhcp_relay ipv6 counters**

This command is used to show ipv6 dhcp_relay counters.

- Usage:
```
show dhcp_relay ipv6 counters
```

- Example:
```
admin@sonic:~$ sudo sonic-clear dhcp_relay counters
     Message Type    Vlan1000
-------------------  ----------
            Unknown           0
            Solicit           0
          Advertise           0
            Request           5
            Confirm           0
              Renew           0
             Rebind           0
              Reply           0
            Release           0
            Decline           0
        Reconfigure           0
Information-Request           0
      Relay-Forward           0
        Relay-Reply           0
          Malformed           0
```

### DHCP Relay clear commands

This sub-section of commands is used to clear the DHCP Relay counters.

**sonic-clear dhcp_relay ipv6 counter**

This command is used to clear ipv6 dhcp_relay counters.

- Usage:
```
sonic-clear dhcp_relay ipv6 counter [-i <interface>]
```

- Example:
```
admin@sonic:~$ sudo sonic-clear dhcp_relay ipv6 counters
```

### DHCP Relay config commands

This sub-section of commands is used to add or remove the DHCP Relay Destination IP address(es) for a VLAN interface.
Expand Down
21 changes: 19 additions & 2 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,20 @@ function load_aboot_secureboot_kernel() {
swipath=$next_image kexec=true loadonly=true ENV_EXTRA_CMDLINE="$BOOT_OPTIONS" bash -
}
function invoke_kexec() {
/sbin/kexec -l "$KERNEL_IMAGE" --initrd="$INITRD" --append="$BOOT_OPTIONS" $@
}
function load_kernel() {
# Load kernel into the memory
/sbin/kexec -a -l "$KERNEL_IMAGE" --initrd="$INITRD" --append="$BOOT_OPTIONS"
invoke_kexec -a
}
function load_kernel_secure() {
# Load kernel into the memory secure
# -s flag is for enforcing the new load kernel(vmlinuz) to be signed and verify.
# not using -a flag, this flag can fallback to an old kexec load that do not support Secure Boot verification
invoke_kexec -s
}
function unload_kernel()
Expand Down Expand Up @@ -601,7 +612,13 @@ fi
if is_secureboot && grep -q aboot_machine= /host/machine.conf; then
load_aboot_secureboot_kernel
else
load_kernel
# check if secure boot is enable in UEFI
SECURE_UPGRADE_ENABLED=$(bootctl status 2>/dev/null | grep -c "Secure Boot: enabled")
if [ ${SECURE_UPGRADE_ENABLED} -eq 1 ]; then
load_kernel_secure
else
load_kernel
fi
fi
init_warm_reboot_states
Expand Down
Loading

0 comments on commit a007d20

Please sign in to comment.