Support DSCP APP selectors (BZ 1618377)
Signed-off-by: Petr Machata <pmachata@gmail.com>
This commit is contained in:
parent
01c0caae7e
commit
9c1bec86cb
@ -7,7 +7,7 @@
|
||||
|
||||
Name: lldpad
|
||||
Version: 1.0.1
|
||||
Release: 11.git%{checkout}%{?dist}
|
||||
Release: 12.git%{checkout}%{?dist}
|
||||
Summary: Intel LLDP Agent
|
||||
Group: System Environment/Daemons
|
||||
License: GPLv2
|
||||
@ -41,6 +41,10 @@ Patch25: open-lldp-v1.0.1-25-l2_linux_packet-correctly-process-return-value-of-g
|
||||
Patch26: open-lldp-v1.0.1-26-lldpad-system-capability-incorrect-advertised-as-sta.patch
|
||||
Patch27: open-lldp-v1.0.1-27-fix-build-warnings.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1618377
|
||||
# https://github.com/intel/openlldp/pull/9
|
||||
Patch28: open-lldp-v1.0.1-28-support-DSCP-selectors.patch
|
||||
|
||||
BuildRequires: automake autoconf libtool
|
||||
BuildRequires: flex >= 2.5.33
|
||||
BuildRequires: kernel-headers >= 2.6.32
|
||||
@ -113,6 +117,9 @@ rm -f %{buildroot}%{_libdir}/liblldp_clif.la
|
||||
%{_libdir}/liblldp_clif.so
|
||||
|
||||
%changelog
|
||||
* Thu Aug 16 2018 Petr Machata <pmachata@gmail.com> - 1.0.1-12.git036e314
|
||||
- Add open-lldp-v1.0.1-28-support-DSCP-selectors.patch (BZ 1618377)
|
||||
|
||||
* Tue Jul 24 2018 Adam Williamson <awilliam@redhat.com> - 1.0.1-11.git036e314
|
||||
- Rebuild for new libconfig
|
||||
|
||||
|
||||
39
open-lldp-v1.0.1-28-support-DSCP-selectors.patch
Normal file
39
open-lldp-v1.0.1-28-support-DSCP-selectors.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From c8e438d610bc8af109c19479ee0f568b271d4030 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Machata <petrm@mellanox.com>
|
||||
Date: Mon, 9 Jul 2018 21:43:41 +0300
|
||||
Subject: [PATCH] lldpad: Support DSCP selectors in APP TLV's
|
||||
|
||||
The P802.1Qcd/D2.1 standard draft introduces a new APP TLV: DSCP, with
|
||||
selector value of 5. Don't reject APP TLV's with selector 5, and
|
||||
sanitize the PID value to not be out of bounds for DSCP.
|
||||
|
||||
Signed-off-by: Petr Machata <petrm@mellanox.com>
|
||||
---
|
||||
lldp_8021qaz_cmds.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lldp_8021qaz_cmds.c b/lldp_8021qaz_cmds.c
|
||||
index 8cb225e..e017e2a 100644
|
||||
--- a/lldp_8021qaz_cmds.c
|
||||
+++ b/lldp_8021qaz_cmds.c
|
||||
@@ -1290,7 +1290,7 @@ static int _set_arg_app(struct cmd *cmd, char *args, char *arg_value,
|
||||
obuf_len - strlen(obuf) - 2);
|
||||
goto err;
|
||||
}
|
||||
- if (sel < 1 || sel > 4) {
|
||||
+ if (sel < 1 || sel > 5) {
|
||||
strncat(obuf, ": selector out of range",
|
||||
obuf_len - strlen(obuf) - 2);
|
||||
goto err;
|
||||
@@ -1305,6 +1305,11 @@ static int _set_arg_app(struct cmd *cmd, char *args, char *arg_value,
|
||||
obuf_len - strlen(obuf) - 2);
|
||||
goto err;
|
||||
}
|
||||
+ if (sel == 5 && pid > 63) {
|
||||
+ strncat(obuf, ": DSCP > 63",
|
||||
+ obuf_len - strlen(obuf) - 2);
|
||||
+ goto err;
|
||||
+ }
|
||||
|
||||
free(parse);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user