]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
libsystemd-network: do not split messages in half
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 29 Apr 2022 13:49:25 +0000 (15:49 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 29 Apr 2022 13:56:53 +0000 (15:56 +0200)
This makes grepping for the messages unnecessarily painful.

src/libsystemd-network/dhcp-packet.c

index d1a1cf57f3d9b1b2e627cdb168587d0740ac14ad..ce40ad5c323d2ec9ae8384f72797bfa75d9c064a 100644 (file)
@@ -144,14 +144,12 @@ int dhcp_packet_verify_headers(DHCPPacket *packet, size_t len, bool checksum, ui
         hdrlen = packet->ip.ihl * 4;
         if (hdrlen < 20)
                 return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
-                                       "ignoring packet: IPv4 IHL (%zu bytes) "
-                                       "smaller than minimum (20 bytes)",
+                                       "ignoring packet: IPv4 IHL (%zu bytes) smaller than minimum (20 bytes)",
                                        hdrlen);
 
         if (len < hdrlen)
                 return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
-                                       "ignoring packet: packet (%zu bytes) "
-                                       "smaller than expected (%zu) by IP header",
+                                       "ignoring packet: packet (%zu bytes) smaller than expected (%zu) by IP header",
                                        len, hdrlen);
 
         /* UDP */
@@ -162,14 +160,12 @@ int dhcp_packet_verify_headers(DHCPPacket *packet, size_t len, bool checksum, ui
 
         if (len < hdrlen + be16toh(packet->udp.len))
                 return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
-                                       "ignoring packet: packet (%zu bytes) "
-                                       "smaller than expected (%zu) by UDP header",
+                                       "ignoring packet: packet (%zu bytes) smaller than expected (%zu) by UDP header",
                                        len, hdrlen + be16toh(packet->udp.len));
 
         if (be16toh(packet->udp.dest) != port)
                 return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
-                                       "ignoring packet: to port %u, which "
-                                       "is not the DHCP client port (%u)",
+                                       "ignoring packet: to port %u, which is not the DHCP client port (%u)",
                                        be16toh(packet->udp.dest), port);
 
         /* checksums - computing these is relatively expensive, so only do it