| 174 | } |
| 175 | |
| 176 | int |
| 177 | ip6_ecn_egress(int mode, const u_int32_t *outer, u_int32_t *inner) |
| 178 | { |
| 179 | u_int8_t outer8, inner8, oinner8; |
| 180 | |
| 181 | if (!outer || !inner) |
| 182 | panic("NULL pointer passed to ip6_ecn_egress"); |
| 183 | |
| 184 | outer8 = (ntohl(*outer) >> 20) & 0xff; |
| 185 | inner8 = oinner8 = (ntohl(*inner) >> 20) & 0xff; |
| 186 | if (ip_ecn_egress(mode, &outer8, &inner8) == 0) |
| 187 | return (0); |
| 188 | if (inner8 != oinner8) { |
| 189 | *inner &= ~htonl(0xff << 20); |
| 190 | *inner |= htonl((u_int32_t)inner8 << 20); |
| 191 | } |
| 192 | return (1); |
| 193 | } |
| 194 | #endif |
no test coverage detected