Skip to content

Conversation

@antoniovazquezblanco
Copy link
Contributor

Checklist:

  • If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • I squashed commits belonging together
  • I added unit tests or explained why they are not relevant
  • I executed the regression tests (using cd test && ./run_tests or tox)
  • If the PR is still not finished, please create a Draft Pull Request

The referenced documentation in the code shows a slightly different name. See below.

imagen

@XenoKovah
Copy link
Contributor

FWIW this isn't actually a typo, the packet used to legitimately be called CONNECT_REQ in BT Core spec <= 4.2, but as of 5.0 they changed it to CONNECT_IND (and we're now on BT Spec 6.0), so it'd just be good to get this synced up with the latest specs.

@antoniovazquezblanco
Copy link
Contributor Author

Oh, makes sense. I went directly to the referenced Core v5.2 in the code and the new name was used...

Thanks!

Copy link
Member

@gpotter2 gpotter2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks for the explanation and thanks for the PR!

@gpotter2 gpotter2 merged commit 5ed385e into secdev:master Feb 3, 2025
22 of 23 checks passed
@XenoKovah
Copy link
Contributor

@gpotter2 I was wondering whether this was going to get rejected on backwards-compatibility grounds (i.e. if the name changes, anyone who used to use CONNECT_REQ will now need to update their code to use CONNECT_IND otherwise it will not work with the latest.) I'm pleased to see that wasn't a blocker. So I just wanted to know what the general Scapy policy is on such things? Because I've just been running my needed changes (including this one) over in a fork, but for instance I saw there were plenty of places where there was inconsistent naming of the same field in different packets (presumably because they were added by different people at different times). So I was wondering whether you'd be open to future PRs which harmonize BT field naming, at the expense of backwards compatibility?

@gpotter2
Copy link
Member

gpotter2 commented Feb 3, 2025

We try to maximize compatibility, especially with fields names (where we have a special deprecated_fields attribute to allow for backwards compatibility).

We should probably invest in having the same for enums, but since we currently don't it's up to a case to case basis. I personally like having up-to-date spec names, and I don't think that Scapy's bluetooth layer is used much in an environment that is even remotely close to production.

@gpotter2 gpotter2 added this to the 2.7.0 milestone Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants