Skip to content

Commit

Permalink
p0f-3.06b
Browse files Browse the repository at this point in the history
fecc9ed8b79dbf8e4d5ffbd22eda9d850b42c3c3 /p0f-3.06b.tgz
  • Loading branch information
lcamtuf authored and majek committed Oct 1, 2012
1 parent 8f6712e commit 7d85575
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 3 deletions.
1 change: 1 addition & 0 deletions api.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ void handle_query(struct p0f_api_query* q, struct p0f_api_response* r) {
r->last_chg = h->last_chg;
r->up_mod_days = h->up_mod_days;
r->distance = h->distance;
r->os_match_q = h->last_quality;

if (h->last_up_min != -1) r->uptime_min = h->last_up_min;

Expand Down
4 changes: 2 additions & 2 deletions api.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct p0f_api_query {
u8 addr_type; /* P0F_ADDR_* */
u8 addr[16]; /* IP address (big endian left align) */

};
} __attribute__((packed));

struct p0f_api_response {

Expand Down Expand Up @@ -68,7 +68,7 @@ struct p0f_api_response {

u8 language[P0F_STR_MAX + 1]; /* Language */

};
} __attribute__((packed));

#ifdef _FROM_P0F

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#

PROGNAME="p0f"
VERSION="3.05b"
VERSION="3.06b"

test "$CC" = "" && CC="gcc"

Expand Down
11 changes: 11 additions & 0 deletions docs/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
Version 3.06b:
--------------

Bug fixes:

- Made os_match_q actually functional in api.c (thanks to Anthony Howe).

- Fixed api.c struct packing issue (thanks to Tomoyuki Murakami).

- Improved logic around the vlan behavior (thanks to Anthony Howe).

Version 3.05b:
--------------

Expand Down
2 changes: 2 additions & 0 deletions docs/README
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,8 @@ including:
Sebastian Roschke
Peter Valchev
Jeff Weisberg
Anthony Howe
Tomoyuki Murakami

If you wish to help, the most immediate way to do so is to simply gather new
signatures, especially from less popular or older platforms (servers, networking
Expand Down
11 changes: 11 additions & 0 deletions p0f.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@ static void prepare_bpf(void) {

vlan_support = (pcap_datalink(pt) == DLT_EN10MB);

retry_no_vlan:

if (!orig_rule) {

if (vlan_support) {
Expand Down Expand Up @@ -575,6 +577,15 @@ static void prepare_bpf(void) {
DEBUG("[#] Computed rule: %s\n", final_rule);

if (pcap_compile(pt, &flt, (char*)final_rule, 1, 0)) {

if (vlan_support) {

if (orig_rule) ck_free(final_rule);
vlan_support = 0;
goto retry_no_vlan;

}

pcap_perror(pt, "[-] pcap_compile");

if (!orig_rule)
Expand Down

0 comments on commit 7d85575

Please sign in to comment.