From: Shravan Rangarajuvenkata (shrarang) Date: Mon, 12 Apr 2021 18:09:05 +0000 (+0000) Subject: Merge pull request #2842 in SNORT/snort3 from ~KAMURTHI/snort3:dhp_new_leash to master X-Git-Tag: 3.1.4.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20f7465f2d35e9a4ae8c794c9c18d52f1c5bf870;p=thirdparty%2Fsnort3.git Merge pull request #2842 in SNORT/snort3 from ~KAMURTHI/snort3:dhp_new_leash to master Squashed commit of the following: commit 1e1db8db55fffc7e4d0d4efffe88234aae80a8f9 Author: Kanimozhi Murthi Date: Mon Apr 12 10:17:05 2021 -0400 appid: clean-up parameters in service_bootp --- diff --git a/src/network_inspectors/appid/service_plugins/service_bootp.cc b/src/network_inspectors/appid/service_plugins/service_bootp.cc index c85e5d87c..f57b60242 100644 --- a/src/network_inspectors/appid/service_plugins/service_bootp.cc +++ b/src/network_inspectors/appid/service_plugins/service_bootp.cc @@ -230,7 +230,7 @@ int BootpServiceDetector::validate(AppIdDiscoveryArgs& args) goto fail; if (option53 && (memcmp(eh->ether_dst, bh->chaddr, 6) == 0)) - add_new_dhcp_lease(args.asd, bh->chaddr, bh->yiaddr, pkt->pkth->ingress_group, + add_new_dhcp_lease(args.asd, bh->chaddr, bh->yiaddr, ntohl(subnet), ntohl(leaseTime), router); goto success; @@ -323,7 +323,6 @@ void BootpServiceDetector::add_dhcp_info(AppIdSession& asd, unsigned op55_len, c } void BootpServiceDetector::add_new_dhcp_lease(AppIdSession& asd, const uint8_t* mac, uint32_t ip, - int32_t zone, uint32_t subnetmask, uint32_t leaseSecs, uint32_t router) { if (memcmp(mac, zeromac, 6) == 0 || ip == 0) diff --git a/src/network_inspectors/appid/service_plugins/service_bootp.h b/src/network_inspectors/appid/service_plugins/service_bootp.h index b633afbbe..8c3ac604b 100644 --- a/src/network_inspectors/appid/service_plugins/service_bootp.h +++ b/src/network_inspectors/appid/service_plugins/service_bootp.h @@ -37,8 +37,8 @@ public: private: void add_dhcp_info(AppIdSession&, unsigned op55_len, const uint8_t* op55, unsigned op60_len, const uint8_t* op60, const uint8_t* mac); - void add_new_dhcp_lease(AppIdSession&, const uint8_t* mac, uint32_t ip, int32_t zone, - uint32_t subnetmask, uint32_t leaseSecs, uint32_t router); + void add_new_dhcp_lease(AppIdSession&, const uint8_t* mac, uint32_t ip, uint32_t subnetmask, + uint32_t leaseSecs, uint32_t router); }; #endif