Commit Graph

10 Commits

Author SHA1 Message Date
Saikrishna Arcot
5b7e55dfac
Package debugging and hardening for dhcpmon and dhcp6relay (#9862) (#10063)
Enable dbgsym package for dhcpmon.

Allow CFLAGS and LDFLAGS from environment variables to be used
in the dhcp6relay build. This makes sure that the -O2 flag from
dpkg-buildflags gets used.

Finally, enable all hardening flags in dpkg-buildflags for
dhcp6relay and dhcpmon. The change from the default set of flags is that
during linking, immediate binding of symbols is done instead of lazy
binding.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
2022-02-25 11:09:15 -08:00
kellyyeh
14aca812e6
Fix dhcpmon bugs (#9008)
* Exclude incrementing on aggregate device if packet received on mgmt interface

* Fix DHCPv6 header offset calculation
2021-10-19 16:15:21 -07:00
shlomibitton
bef5477d0f
[dhcp_relay] Enhance DHCP monitor application to support DHCPv6 (#8060)
#### Why I did it

Enhance DHCP monitor application following the implementation PR: https://github.com/Azure/sonic-buildimage/pull/7772

#### How I did it

Add the support for monitoring DHCPv6 packets.

#### How to verify it

Install an image with this PR and the implementation PR.
2021-07-26 08:41:20 -07:00
trzhang-msft
6f85908d4f
dhcpmon: support dual tor scenario (#7471) 2021-05-03 10:51:26 -07:00
Tamer Ahmed
15f5d47338
[dhcpmon] Print Both Snapshot And Current Counters (#5374)
Printing both snapshot and current counter sets will make it easier to pinpoint
which message type(s) is/are not being relayed. This PR prints both counter sets.
Also, this PR defines gnu11 as a C standard to compile with in order to avoid
making changes when porting to 201811 branch.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-09-15 15:27:36 -07:00
Tamer Ahmed
1bf6fdc6d2
[dhcpmon] Monitor Mgmt Interface For DHCP Packets (#5317)
When BGP routes are missing, DHCP packets get relayed over mgmt
interface. This results in dhcpmon alerting that DHCP packets are
not being relayed. This is PR include mgmt interface as uplink
device, and so, if DHCP packet gets relayed over mgmt interface,
regular dhcpmon alert will not be issues. Instead, dhcpmon will
check the mgmt interface counts and issue a separate alert regarding
packets travelling through mgmt network.

In addition, this PR includes the following enhancements:
1. Add SIGUSR1 handler that prints out current packet counts
2. Increase alert grace window to 3 minutes from currently 2 minutes
3. Time is now computed more accurately
4. Print vlan name before counters

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-09-09 18:37:01 -07:00
joyas-joseph
b48d274f69
[docker-dhcp-relay]: convert dhcp-relay docker to buster (#4671)
Upgrade isc-dhcp to 4.4.1-2 (buster version)
Update libevent dependency for dhcpmon to 2.1-6

Signed-off-by: Joyas Joseph <joyas_joseph@dell.com>
2020-06-22 15:34:21 -07:00
Joe LeVeque
c6365e7abe
Reorganize .gitignore files (#4707)
- Add .gitignore files in each subdirectory of src/, so as to reduce the size of the .gitignore file in the project root, and also make it easier to maintain (i.e., if a directory in src/ is removed, there will not be outdated entries in the root .gitignore file.

- Also add missing .gitignore entries and remove outdated entries and duplicates.
2020-06-09 21:04:55 -07:00
Tamer Ahmed
a60a203b75
[dhcpmon] Filter DHCP O/A Messages of Neighboring Vlans (#4469)
* [dhcpmon] Filter DHCP O/A Messages of Neighboring Vlans

This code fixes a bug where two or more vlans exist. Cross contamination
happens for DHCP packets Offer/Ack when received on shared northbound links.
The code filters out those packet based on dst IP equal Vlan loopback IP.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-04-28 00:57:59 -07:00
Tamer Ahmed
2658ab8add
[dhcp-relay]: Add DHCP Relay Monitor (#3886)
DHCP relay MONitor (dhcpmon) keeps track of DORA messages. If DHCP Relay
is detected to be not forwarding DORA message, dhcpmon will log such event
to syslog. Under the hood dhcpmon keeps counts of clients DR messages,
forwarded DR messages, DHCP server OA messages, and forwarded OA messages.
dhcpmon will check every 12 sec (configurable) if counts are monotonically
increasing and record snapshot of those counters. dhcpmon will report
discrepancies when detected between current counters and snapshot counters.

pull-request: https://github.com/Azure/sonic-buildimage/pull/3886
signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-01-07 17:48:03 -08:00