-
- /*
- * Upcall the proper protocol input routine.
- */
- for (i = 0; i < sizeof (prottbl) / sizeof (struct protent); i++)
- if (prottbl[i].protocol == protocol) {
- (*prottbl[i].input)(0, p, len);
- break;
- } else if (protocol == (prottbl[i].protocol & ~0x8000)
- && prottbl[i].datainput != NULL) {
- (*prottbl[i].datainput)(0, p, len);
- break;
- }
-
- if (i == sizeof (prottbl) / sizeof (struct protent)) {
- if (debug)
- syslog(LOG_WARNING, "Unknown protocol (0x%x) received",
- protocol);
- lcp_sprotrej(0, p - PPP_HDRLEN, len + PPP_HDRLEN);
+ if (protocol == (prottbl[i].protocol & ~0x8000)
+ && prottbl[i].datainput != NULL) {
+ (*prottbl[i].datainput)(0, p, len);
+ return;