summaryrefslogtreecommitdiff
path: root/net-analyzer/gspoof/files/gspoof-def-values.patch
blob: 442f8e821b01b711a64adfa783bd6b78e8b96fec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff -Naurp gspoof-3.2-orig/gfuncts.c gspoof-3.2/gfuncts.c
--- gspoof-3.2-orig/gfuncts.c	2006-09-15 16:39:59.000000000 +0200
+++ gspoof-3.2/gfuncts.c	2006-09-15 17:20:49.000000000 +0200
@@ -47,12 +47,6 @@ int RestoreDefault()
    struct libnet_ether_addr *ethaddr; /* eth address */
    libnet_t *l;
 
-   /* put default value */
-   bzero (&f, 6);
-   bzero (&ck, 2);
-   memset (data, '\0', 128);
-   memset (device, '\0', 10);
-
    /* loading libnet core */
    if ((l=libnet_init(LIBNET_LINK, NULL, ebuf))==NULL)
      {
@@ -126,6 +120,12 @@ int RestoreDefault()
    gtk_entry_set_text (GTK_ENTRY (win_entry), "32767");
    gtk_entry_set_text(GTK_ENTRY (urg_entry), ltostr(urgp));
 
+   /* put default value */
+   bzero (&f, sizeof(f));
+   bzero (&ck, sizeof(ck));
+   memset (data, '\0', 128);
+   memset (device, '\0', 10);
+
    /* Set default variable values */
    f.syn=1;
    m.number=10;