Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slirp 64bit fix #228

Closed
wants to merge 12 commits into from
Closed

Slirp 64bit fix #228

wants to merge 12 commits into from

Conversation

SegHaxx
Copy link

@SegHaxx SegHaxx commented Nov 28, 2020

slirp networking crashes on startup when enabled on aarch64. This is an update of #55 which seems to have gone stale, and fixes the crash. I've removed the unrelated changes from their repo, but they still show in the history, not much I can do about that.

With this patch and #227 I am able to start up System 7.6.1 and use Netscape Communicator on my Raspi4. Also tested and working on Linux x86_64.

@@ -41,6 +41,8 @@ struct M68kRegisters {
uint32 a[8];
};

// vde switch variable
extern char* vde_sock;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see this used anywhere. Is it needed for something?

i = ((struct ipasfrag *)(q->ipf_prev))->ip_off +
((struct ipasfrag *)(q->ipf_prev))->ip_len - ip->ip_off;
if (q->ipf_prev != &fp->frag_link) {
struct ipasfrag *pq = q->ipf_prev;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Indent is off here.

net_if_type = NET_IF_SHEEPNET;
printf("selected Ethernet device type sheep_net\n");
net_if_type = NET_IF_VDE;
printf("selected Ethernet device type vde\n");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: This message is similar to line 272 but with different capitalization.

Let's maybe rephrase it to mention this is the default (e.g. add " (default)" at the end).

Also, can you add a comment about why we default to VDE? I don't actually know what makes it a better default than sheep_net.

Also, how does it work if HAVE_LIBVDEPLUG is not true?

.. Or was this debugging code that should be removed?

@@ -273,8 +273,8 @@ bool ether_init(void)
}
#endif
else {
net_if_type = NET_IF_SHEEPNET;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it mean that NET_IF_SHEEPNET is not longer possible to select? Since there's no command line flag for it anymore?

@SegHaxx
Copy link
Author

SegHaxx commented Dec 1, 2020

Yeah not sure about the VDE stuff. It looks like it may be unfinished. That part should perhaps be reversed yes. I was just happy to see slirp working. :)

Also if you do ':set list' in vim you find that the indentation in the slirp sources is already very random. I tried to clean it up best i could in the patch but these files really need to be entirely reformatted. Which would be best done in it's own patch.

@SegHaxx SegHaxx closed this Dec 12, 2020
@SegHaxx SegHaxx deleted the slirp-64bit-fix branch December 12, 2020 01:00
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