⬢ DragonFlyBSD Kernel Audit
DF-2604 / fix.diff
← back to finding ↓ download raw
--- a/sys/netgraph7/lmi/ng_lmi.c
+++ b/sys/netgraph7/lmi/ng_lmi.c
@@ -689,19 +689,14 @@
 			case 6:/* only on 'group of 4' */
 				dlci = ((u_short) data[2] & 0xff) << 8;
 				dlci |= (data[3] & 0xff);
-				if ((dlci < 1024) && (dlci > 0)) {
-				  /* XXX */
-				}
+				if (dlci > MAXDLCI)
+					goto nextIE;
 				break;
 			case 3:
 				dlci = ((u_short) data[2] & 0x3f) << 4;
 				dlci |= ((data[3] & 0x78) >> 3);
-				if ((dlci < 1024) && (dlci > 0)) {
-					/* set up the bottom half of the
-					 * support for that dlci if it's not
-					 * already been done */
-					/* store this information somewhere */
-				}
+				if (dlci > MAXDLCI)
+					goto nextIE;
 				break;
 			default:
 				goto nextIE;