- uint8_t buf[MAXETHER];
- uint8_t *q;
- int mru = session[s].mru;
- if (mru > sizeof(buf)) mru = sizeof(buf);
-
- l += 6;
- if (l > mru) l = mru;
-
- q = makeppp(buf, sizeof(buf), 0, 0, s, t, PPPLCP);
- if (!q) return;
-
- *q = ProtocolRej;
- *(q + 1) = ++sess_local[s].lcp_ident;
- *(uint16_t *)(q + 2) = htons(l);
- *(uint16_t *)(q + 4) = htons(proto);
- memcpy(q + 6, p, l - 6);
-
- if (proto == PPPIPV6CP)
- LOG(3, s, t, "LCP: send ProtocolRej (IPV6CP: not configured)\n");
- else
- LOG(2, s, t, "LCP: sent ProtocolRej (0x%04X: unsupported)\n", proto);
-
- tunnelsend(buf, l + (q - buf), t);
+ session[s].last_packet = time_now;
+ if (!config->cluster_iam_master) { master_forward_packet(buf, len, addr->sin_addr.s_addr, addr->sin_port); return; }
+ protoreject(s, t, p, l, proto);