]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
respond/reject: minor code cleanups
authorVictor Julien <vjulien@oisf.net>
Thu, 4 May 2023 04:47:37 +0000 (06:47 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 18:36:35 +0000 (20:36 +0200)
(cherry picked from commit 1f0aed07755c89ddcd1cf6c808d8257ddf4efb46)

src/respond-reject-libnet11.c

index b6e4abcc430076c8df8ee44e6502e4ce1fcde959..5149d5eec07129aba7a8c8faa690a1d441d6dc97 100644 (file)
@@ -259,14 +259,11 @@ static inline int BuildEthernet(libnet_t *c, Libnet11Packet *lpacket, uint16_t p
 
 static inline int BuildEthernetVLAN(libnet_t *c, Libnet11Packet *lpacket, uint16_t proto, uint16_t vlan_id)
 {
-    if (libnet_build_802_1q(
-                lpacket->dmac, lpacket->smac, ETHERTYPE_VLAN,
-                0x000, 0x000, vlan_id, proto,
-                NULL,                                   /* payload */
-                0,                                      /* payload size */
-                c,                                      /* libnet handle */
-                0) < 0)
-    {
+    if (libnet_build_802_1q(lpacket->dmac, lpacket->smac, ETHERTYPE_VLAN, 0x00, 0x00, vlan_id,
+                proto, NULL, /* payload */
+                0,           /* payload size */
+                c,           /* libnet handle */
+                0) < 0) {
         SCLogError(SC_ERR_LIBNET_BUILD_FAILED,"libnet_build_802_1q %s", libnet_geterror(c));
         return -1;
     }