windows-rx-jumbo-20080911
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 11 Sep 2008 17:59:18 +0000 (17:59 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 11 Sep 2008 17:59:18 +0000 (17:59 +0000)
LICENSE MIT

Disable rx jumbo by default.  Permit rx jumbo to be enabled with
registry value "RxJumbo" set to 1 or "RxNoJumbo" set to 0.

RxNoJumbo has priority.

src/WINNT/afsd/afsd_init.c

index 82b989e..376be0b 100644 (file)
@@ -1065,7 +1065,15 @@ int afsd_InitCM(char **reasonP)
     code = RegQueryValueEx(parmKey, "RxNoJumbo", NULL, NULL,
                            (BYTE *) &rx_nojumbo, &dummyLen);
     if (code != ERROR_SUCCESS) {
-        rx_nojumbo = 0;
+        DWORD jumbo;
+        dummyLen = sizeof(jumbo);
+        code = RegQueryValueEx(parmKey, "RxJumbo", NULL, NULL,
+                                (BYTE *) &jumbo, &dummyLen);
+        if (code != ERROR_SUCCESS) {
+            rx_nojumbo = 1;
+        } else {
+            rx_nojumbo = !jumbo;
+        }
     }
     if (rx_nojumbo)
         afsi_log("RX Jumbograms are disabled");