"Robert P. J. Day" | 63fc1a9 | 2006-07-02 19:47:05 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
Denis Vlasenko | db12d1d | 2008-12-07 00:52:58 +0000 | [diff] [blame] | 2 | /* |
Denys Vlasenko | 385b456 | 2010-03-26 10:09:34 +0100 | [diff] [blame] | 3 | * Packet ops |
| 4 | * |
Denis Vlasenko | db12d1d | 2008-12-07 00:52:58 +0000 | [diff] [blame] | 5 | * Rewrite by Russ Dill <Russ.Dill@asu.edu> July 2001 |
| 6 | * |
Denys Vlasenko | 0ef64bd | 2010-08-16 20:14:46 +0200 | [diff] [blame] | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
Denis Vlasenko | db12d1d | 2008-12-07 00:52:58 +0000 | [diff] [blame] | 8 | */ |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 9 | #include "common.h" |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 10 | #include "dhcpd.h" |
Dan Fandrich | f533ec8 | 2011-06-10 05:17:59 +0200 | [diff] [blame] | 11 | #include <netinet/in.h> |
| 12 | #include <netinet/if_ether.h> |
| 13 | #include <netpacket/packet.h> |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 14 | |
Denys Vlasenko | 4ee824f | 2017-07-03 01:22:13 +0200 | [diff] [blame] | 15 | #if ENABLE_UDHCPC || ENABLE_UDHCPD |
Denys Vlasenko | 31af3d5 | 2009-06-17 11:57:09 +0200 | [diff] [blame] | 16 | void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type) |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 17 | { |
Denys Vlasenko | c7dc79e | 2010-03-21 06:15:28 +0100 | [diff] [blame] | 18 | memset(packet, 0, sizeof(*packet)); |
Denis Vlasenko | 739e30f | 2008-09-26 23:45:20 +0000 | [diff] [blame] | 19 | packet->op = BOOTREQUEST; /* if client to a server */ |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 20 | switch (type) { |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 21 | case DHCPOFFER: |
| 22 | case DHCPACK: |
| 23 | case DHCPNAK: |
Denis Vlasenko | 739e30f | 2008-09-26 23:45:20 +0000 | [diff] [blame] | 24 | packet->op = BOOTREPLY; /* if server to client */ |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 25 | } |
Denys Vlasenko | c7dc79e | 2010-03-21 06:15:28 +0100 | [diff] [blame] | 26 | packet->htype = 1; /* ethernet */ |
| 27 | packet->hlen = 6; |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 28 | packet->cookie = htonl(DHCP_MAGIC); |
Denys Vlasenko | c7dc79e | 2010-03-21 06:15:28 +0100 | [diff] [blame] | 29 | if (DHCP_END != 0) |
| 30 | packet->options[0] = DHCP_END; |
Denys Vlasenko | 7724c76 | 2010-03-26 09:32:09 +0100 | [diff] [blame] | 31 | udhcp_add_simple_option(packet, DHCP_MESSAGE_TYPE, type); |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 32 | } |
Denys Vlasenko | 4ee824f | 2017-07-03 01:22:13 +0200 | [diff] [blame] | 33 | #endif |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 34 | |
Denys Vlasenko | 7a76eba | 2009-06-19 13:51:29 +0200 | [diff] [blame] | 35 | #if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 2 |
Denys Vlasenko | 31af3d5 | 2009-06-17 11:57:09 +0200 | [diff] [blame] | 36 | void FAST_FUNC udhcp_dump_packet(struct dhcp_packet *packet) |
Denys Vlasenko | ac906fa | 2009-06-17 11:54:52 +0200 | [diff] [blame] | 37 | { |
| 38 | char buf[sizeof(packet->chaddr)*2 + 1]; |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 39 | |
Denys Vlasenko | ac906fa | 2009-06-17 11:54:52 +0200 | [diff] [blame] | 40 | if (dhcp_verbose < 2) |
| 41 | return; |
| 42 | |
Denys Vlasenko | 8f2e99c | 2016-03-30 18:41:23 +0200 | [diff] [blame] | 43 | bb_error_msg( |
| 44 | //"op %x" |
Denys Vlasenko | ac906fa | 2009-06-17 11:54:52 +0200 | [diff] [blame] | 45 | //" htype %x" |
| 46 | " hlen %x" |
| 47 | //" hops %x" |
| 48 | " xid %x" |
| 49 | //" secs %x" |
| 50 | //" flags %x" |
| 51 | " ciaddr %x" |
Denys Vlasenko | 9038d6f | 2009-07-15 20:02:19 +0200 | [diff] [blame] | 52 | " yiaddr %x" |
Denys Vlasenko | ac906fa | 2009-06-17 11:54:52 +0200 | [diff] [blame] | 53 | " siaddr %x" |
| 54 | " giaddr %x" |
| 55 | //" chaddr %s" |
| 56 | //" sname %s" |
| 57 | //" file %s" |
| 58 | //" cookie %x" |
| 59 | //" options %s" |
| 60 | //, packet->op |
| 61 | //, packet->htype |
| 62 | , packet->hlen |
| 63 | //, packet->hops |
| 64 | , packet->xid |
| 65 | //, packet->secs |
| 66 | //, packet->flags |
| 67 | , packet->ciaddr |
| 68 | , packet->yiaddr |
| 69 | , packet->siaddr_nip |
| 70 | , packet->gateway_nip |
| 71 | //, packet->chaddr[16] |
| 72 | //, packet->sname[64] |
| 73 | //, packet->file[128] |
| 74 | //, packet->cookie |
| 75 | //, packet->options[] |
| 76 | ); |
Denys Vlasenko | 6947d2c | 2009-06-17 13:24:03 +0200 | [diff] [blame] | 77 | *bin2hex(buf, (void *) packet->chaddr, sizeof(packet->chaddr)) = '\0'; |
Denys Vlasenko | 8f2e99c | 2016-03-30 18:41:23 +0200 | [diff] [blame] | 78 | bb_error_msg("chaddr %s", buf); |
Denys Vlasenko | ac906fa | 2009-06-17 11:54:52 +0200 | [diff] [blame] | 79 | } |
| 80 | #endif |
| 81 | |
| 82 | /* Read a packet from socket fd, return -1 on read error, -2 on packet error */ |
Denys Vlasenko | 31af3d5 | 2009-06-17 11:57:09 +0200 | [diff] [blame] | 83 | int FAST_FUNC udhcp_recv_kernel_packet(struct dhcp_packet *packet, int fd) |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 84 | { |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 85 | int bytes; |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 86 | |
Denis Vlasenko | 42b3dea | 2007-07-03 15:47:50 +0000 | [diff] [blame] | 87 | memset(packet, 0, sizeof(*packet)); |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 88 | bytes = safe_read(fd, packet, sizeof(*packet)); |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 89 | if (bytes < 0) { |
Denys Vlasenko | 8f2e99c | 2016-03-30 18:41:23 +0200 | [diff] [blame] | 90 | log1("packet read error, ignoring"); |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 91 | return bytes; /* returns -1 */ |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 92 | } |
| 93 | |
Denys Vlasenko | 3b46fcb | 2011-11-05 01:26:18 +0100 | [diff] [blame] | 94 | if (bytes < offsetof(struct dhcp_packet, options) |
| 95 | || packet->cookie != htonl(DHCP_MAGIC) |
| 96 | ) { |
Denys Vlasenko | 8f2e99c | 2016-03-30 18:41:23 +0200 | [diff] [blame] | 97 | bb_error_msg("packet with bad magic, ignoring"); |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 98 | return -2; |
| 99 | } |
Denys Vlasenko | 8f2e99c | 2016-03-30 18:41:23 +0200 | [diff] [blame] | 100 | log1("received %s", "a packet"); |
Denys Vlasenko | ac906fa | 2009-06-17 11:54:52 +0200 | [diff] [blame] | 101 | udhcp_dump_packet(packet); |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 102 | |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 103 | return bytes; |
| 104 | } |
| 105 | |
Denis Vlasenko | 6198792 | 2007-12-21 16:32:30 +0000 | [diff] [blame] | 106 | /* Construct a ip/udp header for a packet, send packet */ |
Denys Vlasenko | 31af3d5 | 2009-06-17 11:57:09 +0200 | [diff] [blame] | 107 | int FAST_FUNC udhcp_send_raw_packet(struct dhcp_packet *dhcp_pkt, |
Denys Vlasenko | b7d19cc | 2010-05-30 23:41:23 +0200 | [diff] [blame] | 108 | uint32_t source_nip, int source_port, |
| 109 | uint32_t dest_nip, int dest_port, const uint8_t *dest_arp, |
Denis Vlasenko | c321b51 | 2008-09-26 16:29:12 +0000 | [diff] [blame] | 110 | int ifindex) |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 111 | { |
Denys Vlasenko | b7d19cc | 2010-05-30 23:41:23 +0200 | [diff] [blame] | 112 | struct sockaddr_ll dest_sll; |
Denys Vlasenko | 31af3d5 | 2009-06-17 11:57:09 +0200 | [diff] [blame] | 113 | struct ip_udp_dhcp_packet packet; |
Denys Vlasenko | b8b72f0 | 2010-05-31 00:45:09 +0200 | [diff] [blame] | 114 | unsigned padding; |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 115 | int fd; |
| 116 | int result = -1; |
| 117 | const char *msg; |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 118 | |
Denis Vlasenko | 5a3395b | 2006-11-18 19:51:32 +0000 | [diff] [blame] | 119 | fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); |
| 120 | if (fd < 0) { |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 121 | msg = "socket(%s)"; |
| 122 | goto ret_msg; |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 123 | } |
| 124 | |
Denys Vlasenko | b7d19cc | 2010-05-30 23:41:23 +0200 | [diff] [blame] | 125 | memset(&dest_sll, 0, sizeof(dest_sll)); |
| 126 | memset(&packet, 0, offsetof(struct ip_udp_dhcp_packet, data)); |
Denys Vlasenko | ac906fa | 2009-06-17 11:54:52 +0200 | [diff] [blame] | 127 | packet.data = *dhcp_pkt; /* struct copy */ |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 128 | |
Denys Vlasenko | b7d19cc | 2010-05-30 23:41:23 +0200 | [diff] [blame] | 129 | dest_sll.sll_family = AF_PACKET; |
| 130 | dest_sll.sll_protocol = htons(ETH_P_IP); |
| 131 | dest_sll.sll_ifindex = ifindex; |
| 132 | dest_sll.sll_halen = 6; |
| 133 | memcpy(dest_sll.sll_addr, dest_arp, 6); |
| 134 | |
| 135 | if (bind(fd, (struct sockaddr *)&dest_sll, sizeof(dest_sll)) < 0) { |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 136 | msg = "bind(%s)"; |
| 137 | goto ret_close; |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 138 | } |
| 139 | |
Denys Vlasenko | b8b72f0 | 2010-05-31 00:45:09 +0200 | [diff] [blame] | 140 | /* We were sending full-sized DHCP packets (zero padded), |
| 141 | * but some badly configured servers were seen dropping them. |
| 142 | * Apparently they drop all DHCP packets >576 *ethernet* octets big, |
| 143 | * whereas they may only drop packets >576 *IP* octets big |
| 144 | * (which for typical Ethernet II means 590 octets: 6+6+2 + 576). |
| 145 | * |
| 146 | * In order to work with those buggy servers, |
| 147 | * we truncate packets after end option byte. |
Johannes Stezenbach | 2d576e2 | 2013-10-28 23:27:37 +0100 | [diff] [blame] | 148 | * |
| 149 | * However, RFC 1542 says "The IP Total Length and UDP Length |
| 150 | * must be large enough to contain the minimal BOOTP header of 300 octets". |
| 151 | * Thus, we retain enough padding to not go below 300 BOOTP bytes. |
| 152 | * Some devices have filters which drop DHCP packets shorter than that. |
Denys Vlasenko | b8b72f0 | 2010-05-31 00:45:09 +0200 | [diff] [blame] | 153 | */ |
| 154 | padding = DHCP_OPTIONS_BUFSIZE - 1 - udhcp_end_option(packet.data.options); |
Johannes Stezenbach | 2d576e2 | 2013-10-28 23:27:37 +0100 | [diff] [blame] | 155 | if (padding > DHCP_SIZE - 300) |
| 156 | padding = DHCP_SIZE - 300; |
Denys Vlasenko | b8b72f0 | 2010-05-31 00:45:09 +0200 | [diff] [blame] | 157 | |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 158 | packet.ip.protocol = IPPROTO_UDP; |
Denys Vlasenko | b7d19cc | 2010-05-30 23:41:23 +0200 | [diff] [blame] | 159 | packet.ip.saddr = source_nip; |
| 160 | packet.ip.daddr = dest_nip; |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 161 | packet.udp.source = htons(source_port); |
| 162 | packet.udp.dest = htons(dest_port); |
Denis Vlasenko | fff145d | 2007-12-20 21:11:38 +0000 | [diff] [blame] | 163 | /* size, excluding IP header: */ |
Denys Vlasenko | 2c3b71a | 2010-10-20 18:04:36 +0200 | [diff] [blame] | 164 | packet.udp.len = htons(UDP_DHCP_SIZE - padding); |
Denis Vlasenko | fff145d | 2007-12-20 21:11:38 +0000 | [diff] [blame] | 165 | /* for UDP checksumming, ip.len is set to UDP packet len */ |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 166 | packet.ip.tot_len = packet.udp.len; |
Baruch Siach | e8f3633 | 2011-09-07 17:52:37 +0200 | [diff] [blame] | 167 | packet.udp.check = inet_cksum((uint16_t *)&packet, |
| 168 | IP_UDP_DHCP_SIZE - padding); |
Denis Vlasenko | fff145d | 2007-12-20 21:11:38 +0000 | [diff] [blame] | 169 | /* but for sending, it is set to IP packet len */ |
Denys Vlasenko | 2c3b71a | 2010-10-20 18:04:36 +0200 | [diff] [blame] | 170 | packet.ip.tot_len = htons(IP_UDP_DHCP_SIZE - padding); |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 171 | packet.ip.ihl = sizeof(packet.ip) >> 2; |
| 172 | packet.ip.version = IPVERSION; |
| 173 | packet.ip.ttl = IPDEFTTL; |
Baruch Siach | e8f3633 | 2011-09-07 17:52:37 +0200 | [diff] [blame] | 174 | packet.ip.check = inet_cksum((uint16_t *)&packet.ip, sizeof(packet.ip)); |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 175 | |
Denys Vlasenko | ac906fa | 2009-06-17 11:54:52 +0200 | [diff] [blame] | 176 | udhcp_dump_packet(dhcp_pkt); |
Denys Vlasenko | 2c3b71a | 2010-10-20 18:04:36 +0200 | [diff] [blame] | 177 | result = sendto(fd, &packet, IP_UDP_DHCP_SIZE - padding, /*flags:*/ 0, |
Denys Vlasenko | b7d19cc | 2010-05-30 23:41:23 +0200 | [diff] [blame] | 178 | (struct sockaddr *) &dest_sll, sizeof(dest_sll)); |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 179 | msg = "sendto"; |
| 180 | ret_close: |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 181 | close(fd); |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 182 | if (result < 0) { |
| 183 | ret_msg: |
| 184 | bb_perror_msg(msg, "PACKET"); |
| 185 | } |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 186 | return result; |
| 187 | } |
| 188 | |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 189 | /* Let the kernel do all the work for packet generation */ |
Denys Vlasenko | 31af3d5 | 2009-06-17 11:57:09 +0200 | [diff] [blame] | 190 | int FAST_FUNC udhcp_send_kernel_packet(struct dhcp_packet *dhcp_pkt, |
Denys Vlasenko | b7d19cc | 2010-05-30 23:41:23 +0200 | [diff] [blame] | 191 | uint32_t source_nip, int source_port, |
| 192 | uint32_t dest_nip, int dest_port) |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 193 | { |
Denys Vlasenko | 50089fc | 2011-11-07 15:44:46 +0100 | [diff] [blame] | 194 | struct sockaddr_in sa; |
Denys Vlasenko | b8b72f0 | 2010-05-31 00:45:09 +0200 | [diff] [blame] | 195 | unsigned padding; |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 196 | int fd; |
| 197 | int result = -1; |
| 198 | const char *msg; |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 199 | |
Denis Vlasenko | 5a3395b | 2006-11-18 19:51:32 +0000 | [diff] [blame] | 200 | fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 201 | if (fd < 0) { |
| 202 | msg = "socket(%s)"; |
| 203 | goto ret_msg; |
| 204 | } |
Denis Vlasenko | a27a11b | 2007-08-18 14:16:39 +0000 | [diff] [blame] | 205 | setsockopt_reuseaddr(fd); |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 206 | |
Denys Vlasenko | 50089fc | 2011-11-07 15:44:46 +0100 | [diff] [blame] | 207 | memset(&sa, 0, sizeof(sa)); |
| 208 | sa.sin_family = AF_INET; |
| 209 | sa.sin_port = htons(source_port); |
| 210 | sa.sin_addr.s_addr = source_nip; |
| 211 | if (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 212 | msg = "bind(%s)"; |
| 213 | goto ret_close; |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 214 | } |
| 215 | |
Denys Vlasenko | 50089fc | 2011-11-07 15:44:46 +0100 | [diff] [blame] | 216 | memset(&sa, 0, sizeof(sa)); |
| 217 | sa.sin_family = AF_INET; |
| 218 | sa.sin_port = htons(dest_port); |
| 219 | sa.sin_addr.s_addr = dest_nip; |
| 220 | if (connect(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 221 | msg = "connect"; |
| 222 | goto ret_close; |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 223 | } |
| 224 | |
Denys Vlasenko | ac906fa | 2009-06-17 11:54:52 +0200 | [diff] [blame] | 225 | udhcp_dump_packet(dhcp_pkt); |
Denys Vlasenko | b8b72f0 | 2010-05-31 00:45:09 +0200 | [diff] [blame] | 226 | padding = DHCP_OPTIONS_BUFSIZE - 1 - udhcp_end_option(dhcp_pkt->options); |
Johannes Stezenbach | 2d576e2 | 2013-10-28 23:27:37 +0100 | [diff] [blame] | 227 | if (padding > DHCP_SIZE - 300) |
| 228 | padding = DHCP_SIZE - 300; |
Denys Vlasenko | b8b72f0 | 2010-05-31 00:45:09 +0200 | [diff] [blame] | 229 | result = safe_write(fd, dhcp_pkt, DHCP_SIZE - padding); |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 230 | msg = "write"; |
| 231 | ret_close: |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 232 | close(fd); |
Denis Vlasenko | 8e5b6f5 | 2007-12-24 17:32:22 +0000 | [diff] [blame] | 233 | if (result < 0) { |
| 234 | ret_msg: |
| 235 | bb_perror_msg(msg, "UDP"); |
| 236 | } |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 237 | return result; |
| 238 | } |